You are here

class BillingAddressPane in Ubercart 8.4

Gets the user's billing address.

Plugin annotation


@CheckoutPane(
  id = "billing",
  title = @Translation("Billing information"),
  weight = 4
)

Hierarchy

Expanded class hierarchy of BillingAddressPane

File

uc_cart/src/Plugin/Ubercart/CheckoutPane/BillingAddressPane.php, line 14

Namespace

Drupal\uc_cart\Plugin\Ubercart\CheckoutPane
View source
class BillingAddressPane extends AddressPaneBase {

  /**
   * {@inheritdoc}
   */
  protected function getDescription() {
    return $this
      ->t('Enter your billing address and information here.');
  }

  /**
   * {@inheritdoc}
   */
  protected function getCopyAddressText() {
    return $this
      ->t('My billing information is the same as my delivery information.');
  }

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [
      'default_same_address' => FALSE,
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function settingsForm() {
    $form['default_same_address'] = [
      '#type' => 'checkbox',
      '#title' => $this
        ->t('Use the same address for billing and delivery by default.'),
      '#default_value' => $this->configuration['default_same_address'],
    ];
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AddressPaneBase::$sourcePaneId protected static property Source pane for "copy address" checkbox.
AddressPaneBase::ajaxRender public function Ajax callback to re-render the full address element.
AddressPaneBase::process public function Processes a checkout pane. Overrides CheckoutPanePluginBase::process
AddressPaneBase::review public function Returns the review contents of a checkout pane. Overrides CheckoutPanePluginInterface::review
AddressPaneBase::sourcePaneId protected function Returns the ID of the source (first) address pane for copying.
AddressPaneBase::view public function Returns the contents of a checkout pane. Overrides CheckoutPanePluginInterface::view
BillingAddressPane::defaultConfiguration public function Gets default configuration for this plugin. Overrides CheckoutPanePluginBase::defaultConfiguration
BillingAddressPane::getCopyAddressText protected function Returns text to display for the 'copy address' field. Overrides AddressPaneBase::getCopyAddressText
BillingAddressPane::getDescription protected function Returns additional text to display as a description. Overrides AddressPaneBase::getDescription
BillingAddressPane::settingsForm public function Returns the settings form for a checkout pane. Overrides CheckoutPanePluginBase::settingsForm
CheckoutPanePluginBase::$status protected property Whether the pane is enabled or not.
CheckoutPanePluginBase::$weight protected property The weight of the checkout pane.
CheckoutPanePluginBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
CheckoutPanePluginBase::getTitle public function Returns the title of the pane, to be displayed on the checkout form. Overrides CheckoutPanePluginInterface::getTitle
CheckoutPanePluginBase::getWeight public function Returns the weight of the checkout pane. Overrides CheckoutPanePluginInterface::getWeight
CheckoutPanePluginBase::isEnabled public function Returns whether the checkout pane is enabled. Overrides CheckoutPanePluginInterface::isEnabled
CheckoutPanePluginBase::prepare public function Prepares a pane for display. Overrides CheckoutPanePluginInterface::prepare 1
CheckoutPanePluginBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
CheckoutPanePluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct 1
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
MessengerTrait::$messenger protected property The messenger. 29
MessengerTrait::messenger public function Gets the messenger. 29
MessengerTrait::setMessenger public function Sets the messenger.
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.