Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LayoutBuilderEntityViewDisplay.php

function LayoutBuilderEntityViewDisplay::save

Overrides ConfigEntityBase::save

File

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

Class

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

Namespace

Drupal\layout_builder\Entity

Code

public function save() : int {
    $return = parent::save();
    if (!\Drupal::moduleHandler()->moduleExists('layout_builder_expose_all_field_blocks')) {
        // Invalidate the block cache in order to regenerate field block
        // definitions.
        \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
    }
    return $return;
}
RSS feed
Powered by Drupal