class LayoutTestDependenciesPlugin

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php \Drupal\layout_test\Plugin\Layout\LayoutTestDependenciesPlugin

Provides a plugin that contains config dependencies.

Plugin annotation


@Layout(
  id = "layout_test_dependencies_plugin",
  label = @Translation("Layout plugin (with dependencies)"),
  category = @Translation("Layout test"),
  description = @Translation("Test layout"),
  regions = {
    "main" = {
      "label" = @Translation("Main Region")
    }
  }
)

Hierarchy

Expanded class hierarchy of LayoutTestDependenciesPlugin

File

core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php, line 23

Namespace

Drupal\layout_test\Plugin\Layout
View source
class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPluginInterface {
  
  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    $dependencies = [];
    $dependencies['config'][] = 'system.menu.my-other-menu';
    return $dependencies;
  }

}

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