You are here

class TwigPlugin in Twig Extender 8

Same name and namespace in other branches
  1. 8.4 src/Annotation/TwigPlugin.php \Drupal\twig_extender\Annotation\TwigPlugin
  2. 8.2 src/Annotation/TwigPlugin.php \Drupal\twig_extender\Annotation\TwigPlugin
  3. 8.3 src/Annotation/TwigPlugin.php \Drupal\twig_extender\Annotation\TwigPlugin
  4. 4.x src/Annotation/TwigPlugin.php \Drupal\twig_extender\Annotation\TwigPlugin

Defines a TwigPlugin annotation object.

Plugin namespace: Plugin\TwigPlugin.

Hierarchy

Expanded class hierarchy of TwigPlugin

7 classes are annotated with TwigPlugin
BlockCreate in src/Plugin/TwigPlugin/BlockCreate.php
The plugin for check authenticated user.
BlockView in src/Plugin/TwigPlugin/BlockView.php
The plugin for check authenticated user.
CurrentLanguage in src/Plugin/TwigPlugin/CurrentLanguage.php
The plugin for check authenticated user.
IsFront in src/Plugin/TwigPlugin/IsFront.php
The plugin for check authenticated user.
ToUrl in src/Plugin/TwigPlugin/ToUrl.php
The plugin for render a url string of url object or ContentEntityBase object.

... See full list

File

src/Annotation/TwigPlugin.php, line 14

Namespace

Drupal\twig_extender\Annotation
View source
class TwigPlugin extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The twig plugin type.
   *
   * Available options:
   *  - filter: A twig filter plugin
   *  - function: A twig function.
   *
   * @var string
   */
  public $type = 'filter';

  /**
   * The twig filter or function name available in twig templates.
   *
   * @var string
   */
  public $name = 'name';

  /**
   * The twig plugin function for process the output.
   *
   * @var string
   */
  public $function = 'function';

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
TwigPlugin::$function public property The twig plugin function for process the output.
TwigPlugin::$id public property The plugin ID.
TwigPlugin::$name public property The twig filter or function name available in twig templates.
TwigPlugin::$type public property The twig plugin type.