Plugin.php

Same filename in this branch
  1. 11.x composer/Plugin/Scaffold/Plugin.php
  2. 11.x core/lib/Drupal/Component/Annotation/Plugin.php
Same filename and directory in other branches
  1. 9 composer/Plugin/Scaffold/Plugin.php
  2. 9 core/lib/Drupal/Component/Annotation/Plugin.php
  3. 8.9.x composer/Plugin/Scaffold/Plugin.php
  4. 8.9.x core/lib/Drupal/Component/Annotation/Plugin.php
  5. 10 composer/Plugin/Scaffold/Plugin.php
  6. 10 core/lib/Drupal/Component/Annotation/Plugin.php
  7. 10 core/lib/Drupal/Component/Plugin/Attribute/Plugin.php

Namespace

Drupal\Component\Plugin\Attribute

File

core/lib/Drupal/Component/Plugin/Attribute/Plugin.php

View source
<?php

namespace Drupal\Component\Plugin\Attribute;


/**
 * Defines a Plugin attribute object.
 *
 * Attributes in plugin classes can use this class in order to pass various
 * metadata about the plugin through the parser to
 * DiscoveryInterface::getDefinitions() calls.
 *
 * @ingroup plugin_api
 */
class Plugin extends AttributeBase {
    
    /**
     * Constructs a plugin attribute object.
     *
     * @param string $id
     *   The attribute class ID.
     * @param class-string|null $deriver
     *   (optional) The deriver class.
     */
    public function __construct(string $id, ?string $deriver = NULL) {
    }

}

Classes

Title Deprecated Summary
Plugin Defines a Plugin attribute object.

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