Пример #1
0
 /**
  * Copy the properties of one field to another
  * @param zibo\library\orm\definition\field\ModelField $source
  * @param zibo\library\orm\definition\field\ModelField $destination
  * @return null
  */
 private function copyField(ModelField $source, ModelField $destination)
 {
     $destination->setLabel($source->getLabel());
     $destination->setIsLocalized($source->isLocalized());
     $validators = $source->getValidators();
     foreach ($validators as $validator) {
         $destination->addValidator($validator);
     }
 }