You are here

class Plugin7A in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/tests/modules/service_container_annotation_discovery_subtest/src/Plugin/Plugin7/Plugin7A/Plugin7A.php \Drupal\service_container_annotation_discovery_subtest\Plugin\Plugin7\Plugin7A\Plugin7A

Class Plugin7A

@Plugin( id = "Plugin7A", label = "Label Plugin7A" )

@package Drupal\service_container_annotation_discovery_subtest\Plugin\Plugin7\Plugin7A

Hierarchy

Expanded class hierarchy of Plugin7A

File

modules/providers/service_container_annotation_discovery/tests/modules/service_container_annotation_discovery_subtest/src/Plugin/Plugin7/Plugin7A/Plugin7A.php, line 20

Namespace

Drupal\service_container_annotation_discovery_subtest\Plugin\Plugin7\Plugin7A
View source
class Plugin7A extends PluginBase implements ContainerFactoryPluginInterface {
  protected $data;

  /**
   * @inheritdoc
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, 'Hello world!');
  }
  public function __construct($configuration, $plugin_id, $plugin_definition, $data) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->data = $data;
  }
  public function getData() {
    return $this->data;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin7A::$data protected property
Plugin7A::create public static function @inheritdoc Overrides ContainerFactoryPluginInterface::create
Plugin7A::getData public function
Plugin7A::__construct public function Constructs a Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin.
PluginBase::$pluginDefinition protected property The plugin implementation definition.
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
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId