original_string: public function handleUpdateAttribute(PostPersistModelEvent $event)
      {
          $model = $event->getModel();
  
          if (('file' !== $model->getProperty('type'))
              || (!$model->getProperty('file_multiple'))
              || ('tl_metamodel_attribute' !== $event->getEnvironment()->getDataDefinition()->getName())
          ) {
              return;
          }
  
          $metaModelsName = $this->getFactory()->translateIdToMetaModelName($model->getProperty('pid'));
          $metaModel      = $this->getFactory()->getMetaModel($metaModelsName);
          $attributeName  = $model->getProperty('colname') . '__sort';
          $tableColumns   = $this->connection->getSchemaManager()->listTableColumns($metaModel->getTableName());
  
          if (\array_key_exists($attributeName, $tableColumns)) {
              return;
          }
  
          $this->tableManipulator->createColumn($metaModel->getTableName(), $attributeName, 'blob NULL');
      }
code: public function handleUpdateAttribute(PostPersistModelEvent $event)
      {
          $model = $event->getModel();
  
          if (('file' !== $model->getProperty('type'))
              || (!$model->getProperty('file_multiple'))
              || ('tl_metamodel_attribute' !== $event->getEnvironment()->getDataDefinition()->getName())
          ) {
              return;
          }
  
          $metaModelsName = $this->getFactory()->translateIdToMetaModelName($model->getProperty('pid'));
          $metaModel      = $this->getFactory()->getMetaModel($metaModelsName);
          $attributeName  = $model->getProperty('colname') . '__sort';
          $tableColumns   = $this->connection->getSchemaManager()->listTableColumns($metaModel->getTableName());
  
          if (\array_key_exists($attributeName, $tableColumns)) {
              return;
          }
  
          $this->tableManipulator->createColumn($metaModel->getTableName(), $attributeName, 'blob NULL');
      }
code_tokens: public function handleUpdateAttribute ( PostPersistModelEvent $ event ) { $ model = $ event -> getModel ( ) ; if ( ( 'file' !== $ model -> getProperty ( 'type' ) ) || ( ! $ model -> getProperty ( 'file_multiple' ) ) || ( 'tl_metamodel_attribute' !== $ event -> getEnvironment ( ) -> getDataDefinition ( ) -> getName ( ) ) ) { return ; } $ metaModelsName = $ this -> getFactory ( ) -> translateIdToMetaModelName ( $ model -> getProperty ( 'pid' ) ) ; $ metaModel = $ this -> getFactory ( ) -> getMetaModel ( $ metaModelsName ) ; $ attributeName = $ model -> getProperty ( 'colname' ) . '__sort' ; $ tableColumns = $ this -> connection -> getSchemaManager ( ) -> listTableColumns ( $ metaModel -> getTableName ( ) ) ; if ( \ array_key_exists ( $ attributeName , $ tableColumns ) ) { return ; } $ this -> tableManipulator -> createColumn ( $ metaModel -> getTableName ( ) , $ attributeName , 'blob NULL' ) ; }
docstring: Handle the update of the file attribute, if switch on for file multiple.
  
  @param PostPersistModelEvent $event The event.
  
  @return void
  
  @throws \Exception If column not exist in the table.
docstring_tokens: Handle the update of the file attribute if switch on for file multiple .