class GroupMediaDeriver in Group Media 8
Same name and namespace in other branches
- 8.2 src/Plugin/GroupContentEnabler/GroupMediaDeriver.php \Drupal\groupmedia\Plugin\GroupContentEnabler\GroupMediaDeriver
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\groupmedia\Plugin\GroupContentEnabler\GroupMediaDeriver
Expanded class hierarchy of GroupMediaDeriver
File
- src/
Plugin/ GroupContentEnabler/ GroupMediaDeriver.php, line 8
Namespace
Drupal\groupmedia\Plugin\GroupContentEnablerView source
class GroupMediaDeriver extends DeriverBase {
/**
* {@inheritdoc}.
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach (MediaBundle::loadMultiple() as $name => $media_bundle) {
$label = $media_bundle
->label();
$this->derivatives[$name] = [
'entity_bundle' => $name,
'label' => t('Group media (@type)', [
'@type' => $label,
]),
'description' => t('Adds %type content to groups both publicly and privately.', [
'%type' => $label,
]),
] + $base_plugin_definition;
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
GroupMediaDeriver:: |
public | function |
. Overrides DeriverBase:: |