You are here

public function LayoutBuilderEntityViewDisplay::isLayoutBuilderEnabled in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::isLayoutBuilderEnabled()
  2. 9 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::isLayoutBuilderEnabled()

Determines if Layout Builder is enabled.

Return value

bool TRUE if Layout Builder is enabled, FALSE otherwise.

Overrides LayoutBuilderEnabledInterface::isLayoutBuilderEnabled

6 calls to LayoutBuilderEntityViewDisplay::isLayoutBuilderEnabled()
LayoutBuilderEntityViewDisplay::getComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Gets the display options set for a component.
LayoutBuilderEntityViewDisplay::isOverridable in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Determines if the display allows custom overrides.
LayoutBuilderEntityViewDisplay::preSave in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Acts on an entity before the presave hook is invoked.
LayoutBuilderEntityViewDisplay::setComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Sets the display options for a component.
LayoutBuilderEntityViewDisplay::setOverridable in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Sets the display to allow or disallow overrides.

... See full list

File

core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php, line 73

Class

LayoutBuilderEntityViewDisplay
Provides an entity view display entity that has a layout.

Namespace

Drupal\layout_builder\Entity

Code

public function isLayoutBuilderEnabled() {

  // Layout Builder must not be enabled for the '_custom' view mode that is
  // used for on-the-fly rendering of fields in isolation from the entity.
  if ($this
    ->isCustomMode()) {
    return FALSE;
  }
  return (bool) $this
    ->getThirdPartySetting('layout_builder', 'enabled');
}