SubformState::createForSubform

public static SubformState::createForSubform(array &$subform, array &$parent_form, FormStateInterface $parent_form_state) Creates a new instance for a subform. Parameters mixed[] $subform: The subform for which to create a form state. mixed[] $parent_form: The subform's parent form. \Drupal\Core\Form\FormStateInterface $parent_form_state: The parent form state. Return value static File core/lib/Drupal/Core/Form/SubformState.php, line 56 Class SubformState Stores information about

SubformState

Stores information about the state of a subform. Hierarchy class \Drupal\Core\Form\FormStateDecoratorBase implements FormStateInterfaceclass \Drupal\Core\Form\SubformState implements SubformStateInterface uses FormStateValuesTrait File core/lib/Drupal/Core/Form/SubformState.php, line 10 Namespace Drupal\Core\Form Members Name Modifiers Type Description FormStateDecoratorBase::$decoratedFormState protected property The decorated form state. FormStateDecoratorBase::addB

StringTranslationTrait::t

protected StringTranslationTrait::t($string, array $args = array(), array $options = array()) Translates a string to the current language or to a given language. See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for important security information and usage guidelines. In order for strings to be localized, make them available in one of the ways supported by the Localization API. When possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwi

StringTranslationTrait::setStringTranslation

public StringTranslationTrait::setStringTranslation(TranslationInterface $translation) Sets the string translation service to use. Parameters \Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation service. Return value $this File core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 118 Class StringTranslationTrait Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Namespace Drupal\Core\StringTranslation Code p

StringTranslationTrait::getNumberOfPlurals

protected StringTranslationTrait::getNumberOfPlurals($langcode = NULL) Returns the number of plurals supported by a given language. See also \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() File core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 88 Class StringTranslationTrait Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Namespace Drupal\Core\StringTranslation Code protected function getNumberOfPlurals($langcode = NULL) { i

StringTranslationTrait::getStringTranslation

protected StringTranslationTrait::getStringTranslation() Gets the string translation service. Return value \Drupal\Core\StringTranslation\TranslationInterface The string translation service. File core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 102 Class StringTranslationTrait Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Namespace Drupal\Core\StringTranslation Code protected function getStringTranslation() { if (!$this->stringTra

StringTranslationTrait::$stringTranslation

The string translation service. Type: \Drupal\Core\StringTranslation\TranslationInterface File core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 29 Class StringTranslationTrait Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Namespace Drupal\Core\StringTranslation Code protected $stringTranslation;

StringTranslationTrait::formatPlural

protected StringTranslationTrait::formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) Formats a string containing a count of items. See also \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() File core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 79 Class StringTranslationTrait Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Namespace Drupal\Core\StringTranslation Code protected funct

StringTranslationTrait

Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. Using this trait will add t() and formatPlural() methods to the class. These must be used for every translatable string, similar to how procedural code must use the global functions t() and \Drupal::translation()->formatPlural(). This allows string extractor tools to find translatable strings. If the class is capable of injecting services from the container, it should inject the 'string_translation' service and assign i

StringStorageInterface::getTranslations

public StringStorageInterface::getTranslations(array $conditions = array(), array $options = array()) Loads multiple string translation objects. Parameters array $conditions: (optional) Array with conditions that will be used to filter the strings returned and may include all of the conditions defined by getStrings(). array $options: (optional) An associative array of additional options. It may contain any of the options defined by getStrings(). Return value \Drupal\locale\StringInterface[] A