You are here

trait LibraryAccessorTrait in Libraries API 8.3

Provides a trait for classes giving access to a library.

Hierarchy

3 files declare their use of LibraryAccessorTrait
InvalidLibraryDependencyException.php in src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php
LibraryNotInstalledException.php in src/ExternalLibrary/Exception/LibraryNotInstalledException.php
UnknownLibraryVersionException.php in src/ExternalLibrary/Exception/UnknownLibraryVersionException.php

File

src/ExternalLibrary/Utility/LibraryAccessorTrait.php, line 8

Namespace

Drupal\libraries\ExternalLibrary\Utility
View source
trait LibraryAccessorTrait {

  /**
   * The library.
   *
   * @var \Drupal\libraries\ExternalLibrary\LibraryInterface
   */
  protected $library;

  /**
   * Returns the library.
   *
   * @return \Drupal\libraries\ExternalLibrary\LibraryInterface
   *   The library.
   */
  public function getLibrary() {
    return $this->library;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LibraryAccessorTrait::$library protected property The library.
LibraryAccessorTrait::getLibrary public function Returns the library.