public function EntityViewDisplay::getPluginCollections in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::getPluginCollections()
Gets the plugin collections used by this entity.
Return value
\Drupal\Component\Plugin\LazyPluginCollection[] An array of plugin collections, keyed by the property name they use to store their configuration.
Overrides EntityWithPluginCollectionInterface::getPluginCollections
File
- core/
lib/ Drupal/ Core/ Entity/ Entity/ EntityViewDisplay.php, line 294 - Contains \Drupal\Core\Entity\Entity\EntityViewDisplay.
Class
- EntityViewDisplay
- Configuration entity that contains display options for all components of a rendered entity in a given view mode.
Namespace
Drupal\Core\Entity\EntityCode
public function getPluginCollections() {
$configurations = array();
foreach ($this
->getComponents() as $field_name => $configuration) {
if (!empty($configuration['type']) && ($field_definition = $this
->getFieldDefinition($field_name))) {
$configurations[$configuration['type']] = $configuration + array(
'field_definition' => $field_definition,
'view_mode' => $this->originalMode,
);
}
}
return array(
'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations),
);
}