class EmailRegistrationCompletionRegistration in Email Registration 8
Provides the registration pane without username.
Assumes email_registration is enabled.
Plugin annotation
@CommerceCheckoutPane(
id = "email_registration_completion_registration",
label = @Translation("Email registration guest registration after checkout"),
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase implements CheckoutPaneInterface, ContainerFactoryPluginInterface
- class \Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CompletionRegister implements CheckoutPaneInterface, ContainerFactoryPluginInterface
- class \Drupal\email_registration\Plugin\Commerce\CheckoutPane\EmailRegistrationCompletionRegistration
- class \Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CompletionRegister implements CheckoutPaneInterface, ContainerFactoryPluginInterface
- class \Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase implements CheckoutPaneInterface, ContainerFactoryPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of EmailRegistrationCompletionRegistration
File
- src/
Plugin/ Commerce/ CheckoutPane/ EmailRegistrationCompletionRegistration.php, line 18
Namespace
Drupal\email_registration\Plugin\Commerce\CheckoutPaneView source
class EmailRegistrationCompletionRegistration extends CompletionRegister {
/**
* {@inheritdoc}
*/
public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form) {
$pane_form = parent::buildPaneForm($pane_form, $form_state, $complete_form);
// Set the name as per email_registration_form_user_register_form_alter().
$pane_form['name'] = [
'#type' => 'hidden',
'#value' => 'email_registration_' . user_password(),
];
// Try and help password managers.
// https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands
$pane_form['email'] = [
'#type' => 'textfield',
'#value' => $this->order
->getEmail(),
'#attributes' => [
'autocomplete' => 'username',
],
'#wrapper_attributes' => [
'style' => 'display: none;',
],
];
return $pane_form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CheckoutPaneBase:: |
protected | property | The parent checkout flow. | |
CheckoutPaneBase:: |
protected | property | The entity type manager. | |
CheckoutPaneBase:: |
protected | property | The current order. | |
CheckoutPaneBase:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
6 |
CheckoutPaneBase:: |
public | function |
Builds a summary of the pane configuration. Overrides CheckoutPaneInterface:: |
5 |
CheckoutPaneBase:: |
public | function |
Builds a summary of the pane values. Overrides CheckoutPaneInterface:: |
3 |
CheckoutPaneBase:: |
public | function |
Calculates dependencies for the configured plugin. Overrides DependentPluginInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets default configuration for this plugin. Overrides ConfigurableInterface:: |
6 |
CheckoutPaneBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane display label. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane ID. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane label. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane step ID. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane weight. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Gets the pane wrapper element. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
CheckoutPaneBase:: |
public | function |
Sets the current order. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Sets the pane step ID. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Sets the pane weight. Overrides CheckoutPaneInterface:: |
|
CheckoutPaneBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
6 |
CheckoutPaneBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
|
CompletionRegister:: |
protected | property | The client IP address. | |
CompletionRegister:: |
protected | property | The credentials check flood controller. | |
CompletionRegister:: |
protected | property | The current user. | |
CompletionRegister:: |
protected | property | The event dispatcher. | |
CompletionRegister:: |
protected | property | The order assignment. | |
CompletionRegister:: |
protected | property | The user authentication object. | |
CompletionRegister:: |
protected | property | The user storage. | |
CompletionRegister:: |
public static | function |
Creates an instance of the plugin. Overrides CheckoutPaneBase:: |
|
CompletionRegister:: |
public | function |
Determines whether the pane is visible. Overrides CheckoutPaneBase:: |
|
CompletionRegister:: |
public | function |
Handles the submission of an pane form. Overrides CheckoutPaneBase:: |
|
CompletionRegister:: |
public | function |
Validates the pane form. Overrides CheckoutPaneBase:: |
|
CompletionRegister:: |
public | function |
Constructs a new CompletionRegister object. Overrides CheckoutPaneBase:: |
|
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 | |
EmailRegistrationCompletionRegistration:: |
public | function |
Builds the pane form. Overrides CompletionRegister:: |
|
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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. | |
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. |