class PaymentReference in Payment 8.2
Same name in this branch
- 8.2 modules/payment_reference/src/PaymentReference.php \Drupal\payment_reference\PaymentReference
- 8.2 modules/payment_reference/src/Element/PaymentReference.php \Drupal\payment_reference\Element\PaymentReference
- 8.2 modules/payment_reference/src/Plugin/Payment/Type/PaymentReference.php \Drupal\payment_reference\Plugin\Payment\Type\PaymentReference
- 8.2 modules/payment_reference/src/Plugin/Field/FieldWidget/PaymentReference.php \Drupal\payment_reference\Plugin\Field\FieldWidget\PaymentReference
- 8.2 modules/payment_reference/src/Plugin/Field/FieldType/PaymentReference.php \Drupal\payment_reference\Plugin\Field\FieldType\PaymentReference
Provides a payment reference element.
Plugin annotation
@FormElement("payment_reference");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\Core\Render\Element\RenderElement implements ElementInterface
- class \Drupal\Core\Render\Element\FormElement implements FormElementInterface
- class \Drupal\payment\Element\PaymentReferenceBase implements ContainerFactoryPluginInterface, FormElementInterface uses FormElementCallbackTrait
- class \Drupal\payment_reference\Element\PaymentReference
- class \Drupal\payment\Element\PaymentReferenceBase implements ContainerFactoryPluginInterface, FormElementInterface uses FormElementCallbackTrait
- class \Drupal\Core\Render\Element\FormElement implements FormElementInterface
- class \Drupal\Core\Render\Element\RenderElement implements ElementInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of PaymentReference
1 file declares its use of PaymentReference
- PaymentReferenceTest.php in modules/
payment_reference/ tests/ src/ Unit/ Element/ PaymentReferenceTest.php
3 #type uses of PaymentReference
- PaymentReference::formElement in modules/
payment_reference/ src/ Plugin/ Field/ FieldWidget/ PaymentReference.php - Returns the form for a single field widget.
- PaymentReferenceElement::buildForm in modules/
payment_reference_test/ src/ PaymentReferenceElement.php - Form constructor.
- PaymentReferenceTest::testFormElement in modules/
payment_reference/ tests/ src/ Unit/ Plugin/ Field/ FieldWidget/ PaymentReferenceTest.php - @covers ::formElement
File
- modules/
payment_reference/ src/ Element/ PaymentReference.php, line 24
Namespace
Drupal\payment_reference\ElementView source
class PaymentReference extends PaymentReferenceBase {
/**
* The payment queue.
*
* @var \Drupal\payment\QueueInterface
*/
protected $paymentQueue;
/**
* Creates a new instance.
*
* @param mixed[] $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 \Symfony\Component\HttpFoundation\RequestStack $request_stack
* @param \Drupal\Core\Entity\EntityStorageInterface $payment_storage
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* @param \Drupal\Core\Datetime\DateFormatter $date_formatter
* @param \Drupal\Core\Utility\LinkGeneratorInterface $link_generator
* @param \Drupal\Core\Render\RendererInterface $renderer
* @param \Drupal\Core\Session\AccountInterface $current_user
* @param \Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorManagerInterface $plugin_selector_manager
* @param \Drupal\plugin\PluginType\PluginTypeInterface $payment_method_type
* @param \Drupal\payment\QueueInterface $payment_queue
*/
public function __construct($configuration, $plugin_id, $plugin_definition, RequestStack $request_stack, EntityStorageInterface $payment_storage, TranslationInterface $string_translation, DateFormatter $date_formatter, LinkGeneratorInterface $link_generator, RendererInterface $renderer, AccountInterface $current_user, PluginSelectorManagerInterface $plugin_selector_manager, PluginTypeInterface $payment_method_type, Random $random, QueueInterface $payment_queue) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $request_stack, $payment_storage, $string_translation, $date_formatter, $link_generator, $renderer, $current_user, $plugin_selector_manager, $payment_method_type, $random);
$this->paymentQueue = $payment_queue;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$entity_type_manager = $container
->get('entity_type.manager');
/** @var \Drupal\plugin\PluginType\PluginTypeManagerInterface $plugin_type_manager */
$plugin_type_manager = $container
->get('plugin.plugin_type_manager');
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('request_stack'), $entity_type_manager
->getStorage('payment'), $container
->get('string_translation'), $container
->get('date.formatter'), $container
->get('link_generator'), $container
->get('renderer'), $container
->get('current_user'), $container
->get('plugin.manager.plugin.plugin_selector'), $plugin_type_manager
->getPluginType('payment_method'), new Random(), $container
->get('payment_reference.queue'));
}
/**
* {@inheritdoc}
*/
protected function getPaymentQueue() {
return $this->paymentQueue;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
FormElement:: |
public static | function | Adds autocomplete functionality to elements. | |
FormElement:: |
public static | function | #process callback for #pattern form element property. | |
FormElement:: |
public static | function | #element_validate callback for #pattern form element property. | |
FormElementCallbackTrait:: |
public static | function | Instantiates this class as a plugin and calls a method on it. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PaymentReference:: |
protected | property | The payment queue. | |
PaymentReference:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
PaymentReference:: |
protected | function |
Gets the payment queue. Overrides PaymentReferenceBase:: |
|
PaymentReference:: |
public | function |
Creates a new instance. Overrides PaymentReferenceBase:: |
|
PaymentReferenceBase:: |
protected | property | The current user. | |
PaymentReferenceBase:: |
protected | property | The date formatter. | |
PaymentReferenceBase:: |
protected | property | The link generator. | |
PaymentReferenceBase:: |
protected | property | The payment method type. | |
PaymentReferenceBase:: |
protected | property | The payment storage. | |
PaymentReferenceBase:: |
protected | property | The plugin selector manager. | |
PaymentReferenceBase:: |
protected | property | The random generator. | |
PaymentReferenceBase:: |
protected | property | The renderer. | |
PaymentReferenceBase:: |
protected | property | The request stack. | |
PaymentReferenceBase:: |
public | function | Implements form AJAX callback. | |
PaymentReferenceBase:: |
public | function | Implements form AJAX callback. | |
PaymentReferenceBase:: |
protected | function | Builds the "Complete payment" link. | |
PaymentReferenceBase:: |
protected | function | Builds the payment form. | |
PaymentReferenceBase:: |
protected | function | Builds the payment view. | |
PaymentReferenceBase:: |
protected | function | Builds the refresh button. | |
PaymentReferenceBase:: |
protected | function | Disables all child elements. | |
PaymentReferenceBase:: |
public | function | Implements form API's element_validate callback. | |
PaymentReferenceBase:: |
protected | function | Gets the entity form display. | |
PaymentReferenceBase:: |
public | function |
Returns the element properties for this element. Overrides ElementInterface:: |
|
PaymentReferenceBase:: |
protected | function | Gets the payment. | |
PaymentReferenceBase:: |
protected | function | Gets the plugin selector. | |
PaymentReferenceBase:: |
constant | The number of seconds a payment should remain stored. | ||
PaymentReferenceBase:: |
public | function | Implements form submit handler. | |
PaymentReferenceBase:: |
public | function | Implements form #process callback. | |
PaymentReferenceBase:: |
public static | function | Implements form #process callback. | |
PaymentReferenceBase:: |
public static | function | Implements form submit handler. | |
PaymentReferenceBase:: |
public static | function |
Determines how user input is mapped to an element's #value property. Overrides FormElement:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
RenderElement:: |
public static | function | Adds Ajax information about an element to communicate with JavaScript. | |
RenderElement:: |
public static | function | Adds members of this group as actual elements for rendering. | |
RenderElement:: |
public static | function | Form element processing handler for the #ajax form property. | 1 |
RenderElement:: |
public static | function | Arranges elements into groups. | |
RenderElement:: |
public static | function |
Sets a form element's class attribute. Overrides ElementInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |