/** * Creates a new instance. * * @param \Drupal\payment\Entity\PaymentInterface $payment * The payment to inject into payment-aware plugin instances. * @param \Drupal\Component\Plugin\PluginManagerInterface $plugin_manager * The decorated plugin manager. * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface|null $discovery * A plugin discovery to use instead of the decorated plugin manager, or * NULL to use the decorated plugin manager. */ public function __construct(PaymentInterface $payment, PluginManagerInterface $plugin_manager, DiscoveryInterface $discovery = NULL) { parent::__construct($plugin_manager, $discovery); $this->payment = $payment; }
/** * Creates a new instance. * * @param string $target_entity_type_id * The ID of the entity type that is to be referenced. * @param \Drupal\Component\Plugin\PluginManagerInterface $plugin_manager * The decorated plugin manager. * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface|null $discovery * A plugin discovery to use instead of the decorated plugin manager, or * NULL to use the decorated plugin manager. */ public function __construct($target_entity_type_id, PluginManagerInterface $plugin_manager, DiscoveryInterface $discovery = NULL) { parent::__construct($plugin_manager, $discovery); $this->targetEntityTypeId = $target_entity_type_id; }