You are here

abstract class EntityInlineFormBase in Commerce Core 8.2

Provides the base class for inline forms that operate on an entity.

Hierarchy

Expanded class hierarchy of EntityInlineFormBase

2 files declare their use of EntityInlineFormBase
CustomerProfile.php in modules/order/src/Plugin/Commerce/InlineForm/CustomerProfile.php
PaymentGatewayForm.php in modules/payment/src/Plugin/Commerce/InlineForm/PaymentGatewayForm.php

File

src/Plugin/Commerce/InlineForm/EntityInlineFormBase.php, line 10

Namespace

Drupal\commerce\Plugin\Commerce\InlineForm
View source
abstract class EntityInlineFormBase extends InlineFormBase implements EntityInlineFormInterface {

  /**
   * The entity.
   *
   * @var \Drupal\Core\Entity\EntityInterface
   */
  protected $entity;

  /**
   * {@inheritdoc}
   */
  public function getEntity() {
    return $this->entity;
  }

  /**
   * {@inheritdoc}
   */
  public function setEntity(EntityInterface $entity) {

    // Modifying $this->entity must not modify the entity in the storage
    // static cache, since that can persist between form builds.
    $this->entity = clone $entity;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AjaxFormTrait::ajaxRefreshForm public static function Ajax handler for refreshing an entire form.
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
EntityInlineFormBase::$entity protected property The entity. 1
EntityInlineFormBase::getEntity public function Gets the entity. Overrides EntityInlineFormInterface::getEntity
EntityInlineFormBase::setEntity public function Sets the entity. Overrides EntityInlineFormInterface::setEntity
InlineFormBase::buildInlineForm public function Builds the inline form. Overrides InlineFormInterface::buildInlineForm 5
InlineFormBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 4
InlineFormBase::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 5
InlineFormBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
InlineFormBase::getLabel public function Gets the inline form label. Overrides InlineFormInterface::getLabel
InlineFormBase::requiredConfiguration protected function Gets the required configuration for this plugin. 5
InlineFormBase::runSubmit public static function Runs the inline form submission.
InlineFormBase::runValidate public static function Runs the inline form validation.
InlineFormBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
InlineFormBase::submitInlineForm public function Submits the inline form. Overrides InlineFormInterface::submitInlineForm 4
InlineFormBase::updatePageTitle public static function Updates the page title based on the inline form's #page_title property.
InlineFormBase::validateConfiguration protected function Validates configuration. 1
InlineFormBase::validateInlineForm public function Validates the inline form. Overrides InlineFormInterface::validateInlineForm 5
InlineFormBase::__construct public function Constructs a new InlineFormBase object. Overrides PluginBase::__construct 4
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.