LayoutTestDependenciesPlugin.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php
  2. 8.9.x core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php
  3. 10 core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php

Namespace

Drupal\layout_test\Plugin\Layout

File

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

View source
<?php

declare (strict_types=1);
namespace Drupal\layout_test\Plugin\Layout;

use Drupal\Component\Plugin\DependentPluginInterface;
use Drupal\Core\Layout\Attribute\Layout;
use Drupal\Core\Layout\LayoutDefault;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Provides a plugin that contains config dependencies.
 */
class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPluginInterface {
    
    /**
     * {@inheritdoc}
     */
    public function calculateDependencies() {
        $dependencies = [];
        $dependencies['config'][] = 'system.menu.my-other-menu';
        return $dependencies;
    }

}

Classes

Title Deprecated Summary
LayoutTestDependenciesPlugin Provides a plugin that contains config dependencies.

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