function TypedDataLanguageRelationshipDeriver::getDerivativeDefinitions

Same name in other branches
  1. 8.x-3.x src/Plugin/Deriver/TypedDataLanguageRelationshipDeriver.php \Drupal\ctools\Plugin\Deriver\TypedDataLanguageRelationshipDeriver::getDerivativeDefinitions()

Overrides TypedDataPropertyDeriverBase::getDerivativeDefinitions

File

src/Plugin/Deriver/TypedDataLanguageRelationshipDeriver.php, line 32

Class

TypedDataLanguageRelationshipDeriver

Namespace

Drupal\ctools\Plugin\Deriver

Code

public function getDerivativeDefinitions($base_plugin_definition) {
    parent::getDerivativeDefinitions($base_plugin_definition);
    // The data types will all be set to string since language extends string
    // and the parent class finds the related primitive.
    foreach ($this->derivatives as $plugin_id => $derivative) {
        $this->derivatives[$plugin_id]['data_type'] = 'language';
    }
    return $this->derivatives;
}