You are here

abstract class MessageNotifyUiSenderSettingsFormBase in Message UI 8

Base class for Message notify ui sender settings form plugins.

Hierarchy

Expanded class hierarchy of MessageNotifyUiSenderSettingsFormBase

1 file declares its use of MessageNotifyUiSenderSettingsFormBase
MessageNotifyUiSenderMailSettingsForm.php in modules/message_notify_ui/src/Plugin/MessageNotifyUiSenderSettingsForm/MessageNotifyUiSenderMailSettingsForm.php

File

modules/message_notify_ui/src/MessageNotifyUiSenderSettingsFormBase.php, line 12

Namespace

Drupal\message_notify_ui
View source
abstract class MessageNotifyUiSenderSettingsFormBase extends PluginBase implements MessageNotifyUiSenderSettingsFormInterface {

  /**
   * The form settings.
   *
   * @var array
   */
  protected $form;

  /**
   * The form state interface.
   *
   * @var \Drupal\Core\Form\FormStateInterface
   */
  protected $formState;

  /**
   * The message object.
   *
   * @var \Drupal\message\Entity\Message
   */
  protected $message;

  /**
   * Setter for the form variable.
   *
   * @param array $form
   *   The form API.
   *
   * @return $this
   */
  public function setForm(array $form) {
    $this->form = $form;
    return $this;
  }

  /**
   * Get the form API element.
   *
   * @return array
   *   The form API variable.
   */
  public function getForm() {
    return $this->form;
  }

  /**
   * Return the form state object.
   *
   * @return \Drupal\Core\Form\FormStateInterface
   *   The form state object.
   */
  public function getFormState() {
    return $this->formState;
  }

  /**
   * Set the form state.
   *
   * @param \Drupal\Core\Form\FormStateInterface $formState
   *   The form state object.
   *
   * @return $this
   */
  public function setFormState(FormStateInterface $formState) {
    $this->formState = $formState;
    return $this;
  }

  /**
   * Get the message object.
   *
   * @return \Drupal\message\Entity\Message
   *   The message object.
   */
  public function getMessage() {
    return $this->message;
  }

  /**
   * Set the message object.
   *
   * @param \Drupal\message\Entity\Message $message
   *   The message object.
   *
   * @return $this
   *   The current object.
   */
  public function setMessage(Message $message) {
    $this->message = $message;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function validate(array $form, FormStateInterface $formState) {

    // Usually, there is nothing to validate.
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MessageNotifyUiSenderSettingsFormBase::$form protected property The form settings.
MessageNotifyUiSenderSettingsFormBase::$formState protected property The form state interface.
MessageNotifyUiSenderSettingsFormBase::$message protected property The message object.
MessageNotifyUiSenderSettingsFormBase::getForm public function Get the form API element.
MessageNotifyUiSenderSettingsFormBase::getFormState public function Return the form state object.
MessageNotifyUiSenderSettingsFormBase::getMessage public function Get the message object.
MessageNotifyUiSenderSettingsFormBase::setForm public function Setter for the form variable.
MessageNotifyUiSenderSettingsFormBase::setFormState public function Set the form state.
MessageNotifyUiSenderSettingsFormBase::setMessage public function Set the message object.
MessageNotifyUiSenderSettingsFormBase::validate public function Validating the form. Overrides MessageNotifyUiSenderSettingsFormInterface::validate 1
MessageNotifyUiSenderSettingsFormInterface::form public function The form settings for the plugin. 1
MessageNotifyUiSenderSettingsFormInterface::submit public function Implementing logic for sender which relate to the plugin. 1
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.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92