You are here

abstract class UserMergePropertyBase in User Merge 2.x

Class UserMergePropertyBase.

@package Drupal\usermerge\Plugin\UserMerge\Property

Hierarchy

Expanded class hierarchy of UserMergePropertyBase

File

src/Plugin/UserMerge/Property/UserMergePropertyBase.php, line 15

Namespace

Drupal\usermerge\Plugin\UserMerge\Property
View source
abstract class UserMergePropertyBase extends PluginBase implements UserMergePropertyPluginInterface {

  /**
   * Entity type manager.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * PropertyComment constructor.
   *
   * @param array $configuration
   *   A configuration array containing information about the plugin instance.
   * @param string $plugin_id
   *   The plugin_id for the plugin instance.
   * @param mixed $plugin_definition
   *   The plugin implementation definition.
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   *   The entity type manager.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->entityTypeManager = $entity_type_manager;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container
      ->get('entity_type.manager'));
  }

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return $this->pluginDefinition['name'];
  }

  /**
   * {@inheritdoc}
   */
  public function getReviewForm() {
    return $this
      ->getPluginDefinition()['review'];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
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 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
UserMergePropertyBase::$entityTypeManager protected property Entity type manager.
UserMergePropertyBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 3
UserMergePropertyBase::getName public function Return the name of the property plugin. Overrides UserMergePropertyPluginInterface::getName
UserMergePropertyBase::getReviewForm public function Get the review form if it is provided by the plugin. Overrides UserMergePropertyPluginInterface::getReviewForm
UserMergePropertyBase::__construct public function PropertyComment constructor. Overrides PluginBase::__construct 3
UserMergePropertyPluginInterface::process public function Process merge on selected property. 6