You are here

public function BlazyEntityBase::getCommonFieldDefinition in Blazy 8.2

Defines the common scope for both front and admin.

2 calls to BlazyEntityBase::getCommonFieldDefinition()
BlazyEntityBase::buildSettings in src/Dejavu/BlazyEntityBase.php
Builds the settings.
BlazyEntityBase::getScopedFormElements in src/Dejavu/BlazyEntityBase.php
Defines the scope for the form elements.

File

src/Dejavu/BlazyEntityBase.php, line 77

Class

BlazyEntityBase
Base class for entity reference formatters without field details.

Namespace

Drupal\blazy\Dejavu

Code

public function getCommonFieldDefinition() {
  $field = $this->fieldDefinition;
  return [
    'current_view_mode' => $this->viewMode,
    'field_name' => $field
      ->getName(),
    'field_type' => $field
      ->getType(),
    'entity_type' => $field
      ->getTargetEntityTypeId(),
    'plugin_id' => $this
      ->getPluginId(),
    'target_type' => $this
      ->getFieldSetting('target_type'),
  ];
}