You are here

public function DefaultEntityReferenceHandler::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/DefaultEntityReferenceHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultEntityReferenceHandler::definePropertyAtType()

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

Overrides FieldHandlerBase::definePropertyAtType

1 method overrides DefaultEntityReferenceHandler::definePropertyAtType()
DefaultUserReferenceHandler::definePropertyAtType in src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php
Provide the Sync Core with the right property definition so this field can be stored and synchronized.

File

src/Plugin/cms_content_sync/field_handler/DefaultEntityReferenceHandler.php, line 122

Class

DefaultEntityReferenceHandler
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
    ->addReferenceProperty($this->fieldName, $this->fieldDefinition
    ->getLabel(), true, $this->fieldDefinition
    ->isRequired());
}