You are here

public function DefaultUserReferenceHandler::definePropertyAtType in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 2.1.x src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultUserReferenceHandler::definePropertyAtType()

Provide the Sync Core with the right property definition so this field can be stored and synchronized.

Overrides DefaultEntityReferenceHandler::definePropertyAtType

File

src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php, line 63

Class

DefaultUserReferenceHandler
Providing a minimalistic implementation for any field type.

Namespace

Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler

Code

public function definePropertyAtType(IDefineEntityType $type_definition) {
  $type_definition
    ->addObjectProperty($this->fieldName, $this->fieldDefinition
    ->getLabel(), true, $this->fieldDefinition
    ->isRequired());
}