interface CheckoutFlowInterface in Commerce Core 8.2
Same name in this branch
- 8.2 modules/checkout/src/Entity/CheckoutFlowInterface.php \Drupal\commerce_checkout\Entity\CheckoutFlowInterface
- 8.2 modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowInterface.php \Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowInterface
Places an order through a series of steps.
Checkout flows are multi-step forms that can be configured by the store administrator. This configuration is stored in the commerce_checkout_flow config entity and injected into the plugin at instantiation.
Hierarchy
- interface \Drupal\Core\Form\FormInterface; interface \Drupal\Core\Form\BaseFormIdInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface
- interface \Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowInterface
Expanded class hierarchy of CheckoutFlowInterface
All classes that implement CheckoutFlowInterface
9 files declare their use of CheckoutFlowInterface
- BillingInformation.php in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutPane/ BillingInformation.php - CheckoutPaneBase.php in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutPane/ CheckoutPaneBase.php - CheckoutPaneManager.php in modules/
checkout/ src/ CheckoutPaneManager.php - CompletionMessage.php in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutPane/ CompletionMessage.php - CompletionRegister.php in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutPane/ CompletionRegister.php
File
- modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowInterface.php, line 20
Namespace
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlowView source
interface CheckoutFlowInterface extends FormInterface, BaseFormIdInterface, ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface, DerivativeInspectionInterface {
/**
* Gets the current order.
*
* @return \Drupal\commerce_order\Entity\OrderInterface
* The current order.
*/
public function getOrder();
/**
* Gets the previous step ID for the given step ID.
*
* Note that we’re not calling getVisibleSteps() on purpose here to bypass
* its static caching which may no longer be valid due to previous panes
* altering the order.
*
* @param string $step_id
* The step ID.
*
* @return string|null
* The previous step, or NULL if there is none.
*/
public function getPreviousStepId($step_id);
/**
* Gets the next step ID for the given step ID.
*
* Note that we’re not calling getVisibleSteps() on purpose here to bypass
* its static caching which may no longer be valid due to previous panes
* altering the order.
*
* @param string $step_id
* The step ID.
*
* @return string|null
* The next step ID, or NULL if there is none.
*/
public function getNextStepId($step_id);
/**
* Redirects an order to a specific step in the checkout.
*
* @param string $step_id
* The step ID to redirect to.
*
* @throws \Drupal\commerce\Response\NeedsRedirectException
*/
public function redirectToStep($step_id);
/**
* Gets the defined steps.
*
* @return array
* An array of step definitions, keyed by step ID.
* Possible keys:
* - label: The label of the step.
* - previous_label: The label shown on the button that returns the
* customer back to this step.
* - next_label: The label shown on the button that sends the customer to
* this step.
* - has_sidebar: Whether the step has a sidebar.
* - hidden: Whether the step is hidden. Hidden steps aren't shown
* in the checkout progress block until they are reached.
* Note:
* If the previous_label or next_label keys are missing, the
* corresponding buttons will not be shown to the customer.
*/
public function getSteps();
/**
* Gets the visible steps.
*
* @return array
* An array of step definitions, keyed by step ID.
*/
public function getVisibleSteps();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseFormIdInterface:: |
public | function | Returns a string identifying the base form. | 5 |
CheckoutFlowInterface:: |
public | function | Gets the next step ID for the given step ID. | 1 |
CheckoutFlowInterface:: |
public | function | Gets the current order. | 1 |
CheckoutFlowInterface:: |
public | function | Gets the previous step ID for the given step ID. | 1 |
CheckoutFlowInterface:: |
public | function | Gets the defined steps. | 1 |
CheckoutFlowInterface:: |
public | function | Gets the visible steps. | 1 |
CheckoutFlowInterface:: |
public | function | Redirects an order to a specific step in the checkout. | 1 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
FormInterface:: |
public | function | Form constructor. | 179 |
FormInterface:: |
public | function | Returns a unique string identifying the form. | 236 |
FormInterface:: |
public | function | Form submission handler. | 192 |
FormInterface:: |
public | function | Form validation handler. | 30 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |