You are here

interface CheckoutPanePluginInterface in Ubercart 8.4

Defines an interface for checkout pane plugins.

The checkout screen for Ubercart is a compilation of enabled checkout panes. A checkout pane can be used to display order information, collect data from the customer, or interact with other panes. Panes are defined in enabled modules as plugins that implement this interface.

Hierarchy

Expanded class hierarchy of CheckoutPanePluginInterface

All classes that implement CheckoutPanePluginInterface

1 file declares its use of CheckoutPanePluginInterface
CheckoutPaneManager.php in uc_cart/src/Plugin/CheckoutPaneManager.php

File

uc_cart/src/CheckoutPanePluginInterface.php, line 18

Namespace

Drupal\uc_cart
View source
interface CheckoutPanePluginInterface extends PluginInspectionInterface, ConfigurableInterface {

  /**
   * Prepares a pane for display.
   *
   * @param \Drupal\uc_order\OrderInterface $order
   *   The order that is being processed.
   * @param array $form
   *   The checkout form array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The checkout form state array.
   */
  public function prepare(OrderInterface $order, array $form, FormStateInterface $form_state);

  /**
   * Returns the contents of a checkout pane.
   *
   * @param \Drupal\uc_order\OrderInterface $order
   *   The order that is being processed.
   * @param array $form
   *   The checkout form array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The checkout form state array.
   *
   * @return array
   *   A form array, with an optional '#description' key to provide help text
   *   for the pane.
   */
  public function view(OrderInterface $order, array $form, FormStateInterface $form_state);

  /**
   * Processes a checkout pane.
   *
   * @param \Drupal\uc_order\OrderInterface $order
   *   The order that is being processed.
   * @param array $form
   *   The checkout form array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The checkout form state array.
   *
   * @return bool
   *   TRUE if the pane is valid, FALSE otherwise.
   */
  public function process(OrderInterface $order, array $form, FormStateInterface $form_state);

  /**
   * Returns the review contents of a checkout pane.
   *
   * @param \Drupal\uc_order\OrderInterface $order
   *   The order that is being processed.
   *
   * @return array
   *   A checkout review array. Each item contains contains "title" and "data"
   *   keys which have HTML to be displayed on the checkout review page.
   */
  public function review(OrderInterface $order);

  /**
   * Returns the settings form for a checkout pane.
   *
   * @return array
   *   A form array.
   */
  public function settingsForm();

  /**
   * Returns the title of the pane, to be displayed on the checkout form.
   *
   * @return string
   *   The pane title.
   */
  public function getTitle();

  /**
   * Returns whether the checkout pane is enabled.
   *
   * @return bool
   *   TRUE if the pane is enabled, FALSE otherwise.
   */
  public function isEnabled();

  /**
   * Returns the weight of the checkout pane.
   *
   * @return int
   *   The integer weight of the checkout pane.
   */
  public function getWeight();

}

Members

Namesort descending Modifiers Type Description Overrides
CheckoutPanePluginInterface::getTitle public function Returns the title of the pane, to be displayed on the checkout form. 1
CheckoutPanePluginInterface::getWeight public function Returns the weight of the checkout pane. 1
CheckoutPanePluginInterface::isEnabled public function Returns whether the checkout pane is enabled. 1
CheckoutPanePluginInterface::prepare public function Prepares a pane for display. 1
CheckoutPanePluginInterface::process public function Processes a checkout pane. 1
CheckoutPanePluginInterface::review public function Returns the review contents of a checkout pane. 6
CheckoutPanePluginInterface::settingsForm public function Returns the settings form for a checkout pane. 1
CheckoutPanePluginInterface::view public function Returns the contents of a checkout pane. 6
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2