You are here

trait IdAccessorTrait in Libraries API 8.3

Provides a trait for classes that have a string identifier.

Hierarchy

2 files declare their use of IdAccessorTrait
LibraryBase.php in src/ExternalLibrary/LibraryBase.php
LibraryTypeBase.php in src/ExternalLibrary/Type/LibraryTypeBase.php

File

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

Namespace

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

  /**
   * The ID.
   *
   * @var string
   */
  protected $id;

  /**
   * Returns the ID.
   *
   * @return string
   *   The ID.
   *
   * @see \Drupal\libraries\ExternalLibrary\LibraryInterface::getId()
   * @see \Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface::getId()
   */
  public function getId() {
    return $this->id;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
IdAccessorTrait::$id protected property The ID.
IdAccessorTrait::getId public function Returns the ID.