You are here

class TypedDataEntityRelationshipDeriver in Chaos Tool Suite (ctools) 8.3

Hierarchy

Expanded class hierarchy of TypedDataEntityRelationshipDeriver

File

src/Plugin/Deriver/TypedDataEntityRelationshipDeriver.php, line 8

Namespace

Drupal\ctools\Plugin\Deriver
View source
class TypedDataEntityRelationshipDeriver extends TypedDataRelationshipDeriver {

  /**
   * {@inheritdoc}
   */
  protected $label = '@property Entity from @base';

  /**
   * {@inheritdoc}
   */
  protected function generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, DataDefinitionInterface $base_definition, $property_name, DataDefinitionInterface $property_definition) {
    if (method_exists($property_definition, 'getType') && $property_definition
      ->getType() == 'entity_reference') {
      parent::generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, $base_definition, $property_name, $property_definition);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
TypedDataEntityRelationshipDeriver::$label protected property The label string for use with derivative labels. Overrides TypedDataPropertyDeriverBase::$label
TypedDataEntityRelationshipDeriver::generateDerivativeDefinition protected function Generates and maintains a derivative definition. Overrides TypedDataRelationshipDeriver::generateDerivativeDefinition
TypedDataPropertyDeriverBase::$typedDataManager protected property
TypedDataPropertyDeriverBase::create public static function Creates a new class instance. Overrides ContainerDeriverInterface::create
TypedDataPropertyDeriverBase::getDataType protected function
TypedDataPropertyDeriverBase::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides DeriverBase::getDerivativeDefinitions 1
TypedDataPropertyDeriverBase::__construct public function TypedDataPropertyDeriverBase constructor.