diff --git a/core/modules/layout_builder/src/DefaultsSectionStorageInterface.php b/core/modules/layout_builder/src/DefaultsSectionStorageInterface.php index a21005a02e214f4ffbcf2c422518cce895c633e4..4fdb7393fe9e961af5b36481d2ae0d2cb5972400 100644 --- a/core/modules/layout_builder/src/DefaultsSectionStorageInterface.php +++ b/core/modules/layout_builder/src/DefaultsSectionStorageInterface.php @@ -6,27 +6,5 @@ /** * Defines an interface for an object that stores layout sections for defaults. - * - * @todo Refactor this interface in https://www.drupal.org/node/2985362. */ -interface DefaultsSectionStorageInterface extends SectionStorageInterface, ThirdPartySettingsInterface, LayoutBuilderEnabledInterface { - - /** - * Determines if the defaults allow custom overrides. - * - * @return bool - * TRUE if custom overrides are allowed, FALSE otherwise. - */ - public function isOverridable(); - - /** - * Sets the defaults to allow or disallow overrides. - * - * @param bool $overridable - * TRUE if the display should allow overrides, FALSE otherwise. - * - * @return $this - */ - public function setOverridable($overridable = TRUE); - -} +interface DefaultsSectionStorageInterface extends SectionStorageInterface, ThirdPartySettingsInterface, LayoutBuilderEnabledInterface, LayoutBuilderOverridableInterface {} diff --git a/core/modules/layout_builder/src/Entity/LayoutEntityDisplayInterface.php b/core/modules/layout_builder/src/Entity/LayoutEntityDisplayInterface.php index 0122c39955b44f7506052779ebd146e3a144df91..c172c23db79164bcb08348ad841985f0f25f4f1c 100644 --- a/core/modules/layout_builder/src/Entity/LayoutEntityDisplayInterface.php +++ b/core/modules/layout_builder/src/Entity/LayoutEntityDisplayInterface.php @@ -5,30 +5,9 @@ use Drupal\Core\Entity\Display\EntityDisplayInterface; use Drupal\layout_builder\LayoutBuilderEnabledInterface; use Drupal\layout_builder\SectionListInterface; +use Drupal\layout_builder\LayoutBuilderOverridableInterface; /** * Provides an interface for entity displays that have layout. - * - * @todo Refactor this interface in https://www.drupal.org/node/2985362. */ -interface LayoutEntityDisplayInterface extends EntityDisplayInterface, SectionListInterface, LayoutBuilderEnabledInterface { - - /** - * Determines if the display allows custom overrides. - * - * @return bool - * TRUE if custom overrides are allowed, FALSE otherwise. - */ - public function isOverridable(); - - /** - * Sets the display to allow or disallow overrides. - * - * @param bool $overridable - * TRUE if the display should allow overrides, FALSE otherwise. - * - * @return $this - */ - public function setOverridable($overridable = TRUE); - -} +interface LayoutEntityDisplayInterface extends EntityDisplayInterface, SectionListInterface, LayoutBuilderEnabledInterface, LayoutBuilderOverridableInterface {} diff --git a/core/modules/layout_builder/src/LayoutBuilderOverridableInterface.php b/core/modules/layout_builder/src/LayoutBuilderOverridableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d3981984fd4917a9a6a8c4ac7258aeb503425149 --- /dev/null +++ b/core/modules/layout_builder/src/LayoutBuilderOverridableInterface.php @@ -0,0 +1,28 @@ +<?php + +namespace Drupal\layout_builder; + +/** + * Provides an interface for displays that could be overridable. + */ +interface LayoutBuilderOverridableInterface { + + /** + * Determines if the display allows custom overrides. + * + * @return bool + * TRUE if custom overrides are allowed, FALSE otherwise. + */ + public function isOverridable(); + + /** + * Sets the display to allow or disallow overrides. + * + * @param bool $overridable + * TRUE if the display should allow overrides, FALSE otherwise. + * + * @return $this + */ + public function setOverridable($overridable = TRUE); + +}