Implements DerivativeInterface::getDerivativeDefinitions().
Overrides DerivativeInterface::getDerivativeDefinitions
public function getDerivativeDefinitions(array $base_plugin_definition) {
if (!isset($this->derivatives)) {
// Add in the default plugin configuration and the resource type.
foreach (entity_get_info() as $entity_type => $entity_info) {
$this->derivatives[$entity_type] = array(
'id' => 'entity:' . $entity_type,
'entity_type' => $entity_type,
'label' => $entity_info['label'],
);
$this->derivatives[$entity_type] += $base_plugin_definition;
}
}
return $this->derivatives;
}