trait DependencyAccessorTrait in Libraries API 8.3
Provides a trait for classes giving access to a library dependency.
Hierarchy
- trait \Drupal\libraries\ExternalLibrary\Utility\DependencyAccessorTrait
1 file declares its use of DependencyAccessorTrait
- InvalidLibraryDependencyException.php in src/
ExternalLibrary/ Exception/ InvalidLibraryDependencyException.php
File
- src/
ExternalLibrary/ Utility/ DependencyAccessorTrait.php, line 8
Namespace
Drupal\libraries\ExternalLibrary\UtilityView source
trait DependencyAccessorTrait {
/**
* The dependency.
*
* @var \Drupal\libraries\ExternalLibrary\LibraryInterface
*/
protected $dependency;
/**
* Returns the dependency.
*
* @return \Drupal\libraries\ExternalLibrary\LibraryInterface
* The library.
*/
public function getLibrary() {
return $this->dependency;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencyAccessorTrait:: |
protected | property | The dependency. | |
DependencyAccessorTrait:: |
public | function | Returns the dependency. |