NestedArray::mergeDeepArray

public static NestedArray::mergeDeepArray(array $arrays, $preserve_integer_keys = FALSE) Merges multiple arrays, recursively, and returns the merged array. This function is equivalent to NestedArray::mergeDeep(), except the input arrays are passed as a single array parameter rather than a variable parameter list. The following are equivalent: NestedArray::mergeDeep($a, $b); NestedArray::mergeDeepArray(array($a, $b)); The following are also equivalent: call_user_func_array('NestedArray::mer

NestedArray::mergeDeep

public static NestedArray::mergeDeep() Merges multiple arrays, recursively, and returns the merged array. This function is similar to PHP's array_merge_recursive() function, but it handles non-array values differently. When merging values that are not both arrays, the latter value replaces the former rather than merging with it. Example: $link_options_1 = array('fragment' => 'x', 'attributes' => array('title' => t('X'), 'class' => array('a', 'b'))); $link_options_2 = array('fragment

NestedArray::keyExists

public static NestedArray::keyExists(array $array, array $parents) Determines whether a nested array contains the requested keys. This helper function should be used when the depth of the array element to be checked may vary (that is, the number of parent keys is variable). See NestedArray::setValue() for details. It is primarily used for form structures and renderable arrays. If it is required to also get the value of the checked nested key, use NestedArray::getValue() instead. If the number o

NestedArray::getValue

public static &NestedArray::getValue(array &$array, array $parents, &$key_exists = NULL) Retrieves a value from a nested array with variable depth. This helper function should be used when the depth of the array element being retrieved may vary (that is, the number of parent keys is variable). It is primarily used for form structures and renderable arrays. Without this helper function the only way to get a nested array value with variable depth in one line would be using eval(), whi

NestedArray::filter

public static NestedArray::filter(array $array, callable $callable = NULL) Filters a nested array recursively. Parameters array $array: The filtered nested array. callable|null $callable: The callable to apply for filtering. Return value array The filtered array. File core/lib/Drupal/Component/Utility/NestedArray.php, line 358 Class NestedArray Provides helpers to perform operations on nested arrays and array keys of variable depth. Namespace Drupal\Component\Utility Code public stat

NestedArray

Provides helpers to perform operations on nested arrays and array keys of variable depth. Hierarchy class \Drupal\Component\Utility\NestedArray Related topics Utility classes and functions Overview of utility classes and functions for developers. File core/lib/Drupal/Component/Utility/NestedArray.php, line 10 Namespace Drupal\Component\Utility Members Name Modifiers Type Description NestedArray::filter public static function Filters a nested array recursively. Nested

NegotiationUrlForm::__construct

public NegotiationUrlForm::__construct(ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager) Constructs a new NegotiationUrlForm object. Parameters \Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects. \Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager. Overrides ConfigFormBase::__construct File core/modules/language/src/Form/NegotiationUrlForm.php, line 33 Class NegotiationUrlFor

NegotiationUrlForm::validateForm

public NegotiationUrlForm::validateForm(array &$form, FormStateInterface $form_state) Form validation handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormBase::validateForm File core/modules/language/src/Form/NegotiationUrlForm.php, line 136 Class NegotiationUrlForm Configure the URL language negotiation method for this site. Namespace Drupal\langua

NegotiationUrlForm::submitForm

public NegotiationUrlForm::submitForm(array &$form, FormStateInterface $form_state) Form submission handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides ConfigFormBase::submitForm File core/modules/language/src/Form/NegotiationUrlForm.php, line 205 Class NegotiationUrlForm Configure the URL language negotiation method for this site. Namespace Drupal\lang

NegotiationUrlForm::getFormId

public NegotiationUrlForm::getFormId() Returns a unique string identifying the form. Return value string The unique string identifying the form. Overrides FormInterface::getFormId File core/modules/language/src/Form/NegotiationUrlForm.php, line 51 Class NegotiationUrlForm Configure the URL language negotiation method for this site. Namespace Drupal\language\Form Code public function getFormId() { return 'language_negotiation_configure_url_form'; }