You are here

class ReferenceablePluginTypesEvent in Commerce Core 8.2

Defines the referenceable plugin types event.

Hierarchy

Expanded class hierarchy of ReferenceablePluginTypesEvent

See also

\Drupal\commerce\Event\CommerceEvents

2 files declare their use of ReferenceablePluginTypesEvent
PluginItemDeriver.php in src/Plugin/Field/FieldType/PluginItemDeriver.php
ReferenceablePluginTypesSubscriber.php in tests/modules/commerce_test/src/EventSubscriber/ReferenceablePluginTypesSubscriber.php

File

src/Event/ReferenceablePluginTypesEvent.php, line 12

Namespace

Drupal\commerce\Event
View source
class ReferenceablePluginTypesEvent extends EventBase {

  /**
   * The plugin types, in the id => label format.
   *
   * @var array
   */
  protected $pluginTypes;

  /**
   * Constructs a new ReferenceablePluginTypesEvent object.
   *
   * @param array $plugin_types
   *   The plugin types, in the id => label format.
   */
  public function __construct(array $plugin_types) {
    $this->pluginTypes = $plugin_types;
  }

  /**
   * Gets the plugin types.
   *
   * @return array
   *   The plugin types, in the id => label format.
   */
  public function getPluginTypes() {
    return $this->pluginTypes;
  }

  /**
   * Sets the plugin types.
   *
   * @param array $plugin_types
   *   The plugin types, in the id => label format.
   *
   * @return $this
   */
  public function setPluginTypes(array $plugin_types) {
    $this->pluginTypes = $plugin_types;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ReferenceablePluginTypesEvent::$pluginTypes protected property The plugin types, in the id => label format.
ReferenceablePluginTypesEvent::getPluginTypes public function Gets the plugin types.
ReferenceablePluginTypesEvent::setPluginTypes public function Sets the plugin types.
ReferenceablePluginTypesEvent::__construct public function Constructs a new ReferenceablePluginTypesEvent object.