DependencyAccessorTrait.php in Libraries API 8.3
Namespace
Drupal\libraries\ExternalLibrary\UtilityFile
src/ExternalLibrary/Utility/DependencyAccessorTrait.phpView source
<?php
namespace Drupal\libraries\ExternalLibrary\Utility;
/**
* Provides a trait for classes giving access to a library dependency.
*/
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;
}
}
Traits
Name | Description |
---|---|
DependencyAccessorTrait | Provides a trait for classes giving access to a library dependency. |