class AnnotationBase

Same name in other branches
  1. 9 core/lib/Drupal/Component/Annotation/AnnotationBase.php \Drupal\Component\Annotation\AnnotationBase
  2. 8.9.x core/lib/Drupal/Component/Annotation/AnnotationBase.php \Drupal\Component\Annotation\AnnotationBase
  3. 11.x core/lib/Drupal/Component/Annotation/AnnotationBase.php \Drupal\Component\Annotation\AnnotationBase

Provides a base class for classed annotations.

Hierarchy

Expanded class hierarchy of AnnotationBase

4 files declare their use of AnnotationBase
AnnotationBaseTest.php in core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
PluginExample.php in core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
PluralTranslation.php in core/lib/Drupal/Core/Annotation/PluralTranslation.php
Translation.php in core/lib/Drupal/Core/Annotation/Translation.php

File

core/lib/Drupal/Component/Annotation/AnnotationBase.php, line 8

Namespace

Drupal\Component\Annotation
View source
abstract class AnnotationBase implements AnnotationInterface {
    
    /**
     * The annotated class ID.
     *
     * @var string
     */
    public $id;
    
    /**
     * The class used for this annotated class.
     *
     * @var string
     */
    protected $class;
    
    /**
     * The provider of the annotated class.
     *
     * @var string
     */
    protected $provider;
    
    /**
     * {@inheritdoc}
     */
    public function getProvider() {
        return $this->provider;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setProvider($provider) {
        $this->provider = $provider;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getId() {
        return $this->id;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getClass() {
        return $this->class;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setClass($class) {
        $this->class = $class;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AnnotationBase::$class protected property The class used for this annotated class.
AnnotationBase::$id public property The annotated class ID. 1
AnnotationBase::$provider protected property The provider of the annotated class.
AnnotationBase::getClass public function Overrides AnnotationInterface::getClass
AnnotationBase::getId public function Overrides AnnotationInterface::getId 1
AnnotationBase::getProvider public function Overrides AnnotationInterface::getProvider
AnnotationBase::setClass public function Overrides AnnotationInterface::setClass
AnnotationBase::setProvider public function Overrides AnnotationInterface::setProvider
AnnotationInterface::get public function Gets the value of an annotation. 6

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.