function QuickEditLayoutBuilderEntityViewDisplay::getComponent

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\Entity

Code

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.