You are here

abstract class AuthorDatumBase in Author Pane 8.3

Hierarchy

Expanded class hierarchy of AuthorDatumBase

1 file declares its use of AuthorDatumBase
Username.php in src/Plugin/AuthorPane/Username.php
Contains \Drupal\author_pane\Plugin\Username.

File

src/Plugin/AuthorPane/AuthorDatumBase.php, line 15
Contains \Drupal\author_pane\Plugin\AuthorPane\AuthorDatumBase.

Namespace

Drupal\author_pane\Plugin\AuthorPane
View source
abstract class AuthorDatumBase extends PluginBase {

  /**
   * Machine name of the plugin.
   *
   * @var string
   */
  protected $id;

  /**
   * Title of the plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  protected $label;

  /**
   * A longer explanation of what the plugin is for.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  protected $description;

  /**
   * The value associated with the plugin in this instance.
   *
   * @var mixed
   */
  protected $value;

  /**
   * @var \Drupal\user\Entity\User
   */
  protected $author;

  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);

    // Set the properties from the annotation.
    $this->id = $plugin_definition['id'];
    $this->label = $plugin_definition['label'];
    $this->description = $plugin_definition['description'];
  }

  /**
   * Returns the id of the datum.
   *
   * @return string
   */
  public function id() {
    return $this->id;
  }

  /**
   * Returns the label of the datum.
   *
   * @return \Drupal\Core\Annotation\Translation
   */
  public function label() {
    return $this->label;
  }

  /**
   * Returns the description of the datum.
   *
   * @return \Drupal\Core\Annotation\Translation
   */
  public function description() {
    return $this->description;
  }

  /**
   * Returns the value of the datum.
   *
   * @return mixed
   */
  protected function value() {
    return $this->value;
  }

  /**
   * Sets the value of the datum.
   *
   * @param $value
   */
  public function setValue($value) {
    $this->value = $value;
  }

  /**
   * Sets the author of the datum.
   *
   * @param $author
   */
  public function setAuthor($author) {
    $this->author = $author;
  }

  /**
   * Returns the HTML string that contains the output of the datum.
   */
  public function output() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuthorDatumBase::$author protected property
AuthorDatumBase::$description protected property A longer explanation of what the plugin is for.
AuthorDatumBase::$id protected property Machine name of the plugin.
AuthorDatumBase::$label protected property Title of the plugin.
AuthorDatumBase::$value protected property The value associated with the plugin in this instance.
AuthorDatumBase::description public function Returns the description of the datum.
AuthorDatumBase::id public function Returns the id of the datum.
AuthorDatumBase::label public function Returns the label of the datum.
AuthorDatumBase::output public function Returns the HTML string that contains the output of the datum. 1
AuthorDatumBase::setAuthor public function Sets the author of the datum.
AuthorDatumBase::setValue public function Sets the value of the datum.
AuthorDatumBase::value protected function Returns the value of the datum.
AuthorDatumBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.