You are here

trait SettableDiscoveryExtensionListTrait in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php \Drupal\Tests\Core\Extension\SettableDiscoveryExtensionListTrait

Trait that allows extension discovery to be set.

Hierarchy

File

core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php, line 217

Namespace

Drupal\Tests\Core\Extension
View source
trait SettableDiscoveryExtensionListTrait {

  /**
   * The extension discovery for this extension list.
   *
   * @var \Drupal\Core\Extension\ExtensionDiscovery
   */
  protected $extensionDiscovery;

  /**
   * Sets the extension discovery.
   *
   * @param \Drupal\Core\Extension\ExtensionDiscovery $discovery
   *   The extension discovery.
   */
  public function setExtensionDiscovery(ExtensionDiscovery $discovery) {
    $this->extensionDiscovery = $discovery;
  }

  /**
   * {@inheritdoc}
   */
  public function getExtensionDiscovery() {
    return $this->extensionDiscovery;
  }

}

Members