public function QuickEditLayoutBuilderEntityViewDisplay::getComponent in Drupal 10
Gets the display options set for a component.
Parameters
string $name: The name of the component.
Return value
array|null The display options for the component, or NULL if the component is not displayed.
Overrides LayoutBuilderEntityViewDisplay::getComponent
File
- core/
modules/ quickedit/ src/ Entity/ QuickEditLayoutBuilderEntityViewDisplay.php, line 18
Class
- QuickEditLayoutBuilderEntityViewDisplay
- Provides an entity view display entity that has a layout with quickedit.
Namespace
Drupal\quickedit\EntityCode
public function getComponent($name) {
if ($this
->isLayoutBuilderEnabled() && ($section_component = $this
->getQuickEditSectionComponent())) {
$plugin = $section_component
->getPlugin();
if ($plugin instanceof ConfigurableInterface) {
$configuration = $plugin
->getConfiguration();
if (isset($configuration['formatter'])) {
return $configuration['formatter'];
}
}
}
return parent::getComponent($name);
}