public function SelectionBase::getDerivativeDefinition

Implements DerivativeInterface::getDerivativeDefinition().

Overrides DerivativeInterface::getDerivativeDefinition

File

drupal/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Derivative/SelectionBase.php, line 27
Contains \Drupal\entity_reference\Plugin\Derivative\SelectionBase.

Class

SelectionBase
Base class for selection plugins provided by Entity Reference.

Namespace

Drupal\entity_reference\Plugin\Derivative

Code

public function getDerivativeDefinition($derivative_id, array $base_plugin_definition) {
  if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) {
    return $this->derivatives[$derivative_id];
  }
  $this
    ->getDerivativeDefinitions($base_plugin_definition);
  return $this->derivatives[$derivative_id];
}