Radios::valueCallback

public static Radios::valueCallback(&$element, $input, FormStateInterface $form_state) Determines how user input is mapped to an element's #value property. Parameters array $element: An associative array containing the properties of the element. mixed $input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value mixed The value to assig

Radios::processRadios

public static Radios::processRadios(&$element, FormStateInterface $form_state, &$complete_form) Expands a radios element into individual radio elements. File core/lib/Drupal/Core/Render/Element/Radios.php, line 55 Class Radios Provides a form element for a set of radio buttons. Namespace Drupal\Core\Render\Element Code public static function processRadios(&$element, FormStateInterface $form_state, &$complete_form) { if (count($element['#options']) > 0) { $weigh

Radios::getInfo

public Radios::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Radios.php, line 38 Class Radios Provides a form element for a set of radio buttons. Namespace Drupal\Core\Render\Element Code public

radios.html.twig

Default theme implementation for a 'radios' #type form element. Available variables attributes: A list of HTML attributes for the wrapper element. children: The rendered radios. See also template_preprocess_radios() File core/modules/system/templates/radios.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.

Radios

Provides a form element for a set of radio buttons. Properties: #options: An associative array, where the keys are the returned values for each radio button, and the values are the labels next to each radio button. Usage example: $form['settings']['active'] = array( '#type' => 'radios', '#title' => $this->t('Poll status'), '#default_value' => 1, '#options' => array(0 => $this->t('Closed'), 1 => $this->t('Active')), ); Plugin annotation @FormElement("radios

Radio::preRenderRadio

public static Radio::preRenderRadio($element) Prepares a #type 'radio' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #required, #return_value, #value, #attributes, #title, #description. The #name property will be sanitized before output. This is currently done by initializing Drupal\Core\Template\Attribute with all the attributes. Return value array The $element with prepared variables ready for i

Radio::getInfo

public Radio::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Radio.php, line 23 Class Radio Provides a form element for a single radio button. Namespace Drupal\Core\Render\Element Code public fun

Radio

Provides a form element for a single radio button. This is an internal element that is primarily used to render the radios form element. Refer to \Drupal\Core\Render\Element\Radios for more documentation. Plugin annotation @FormElement("radio") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\Render

quickedit_preprocess_page_title

quickedit_preprocess_page_title(&$variables) Implements hook_preprocess_HOOK() for the page title template. File core/modules/quickedit/quickedit.module, line 119 Provides in-place content editing functionality for fields. Code function quickedit_preprocess_page_title(&$variables) { $variables['title_attributes']['class'][] = 'js-quickedit-page-title'; }

quickedit_preprocess_field

quickedit_preprocess_field(&$variables) Implements hook_preprocess_HOOK() for field templates. File core/modules/quickedit/quickedit.module, line 126 Provides in-place content editing functionality for fields. Code function quickedit_preprocess_field(&$variables) { $variables['#cache']['contexts'][] = 'user.permissions'; if (!\Drupal::currentUser()->hasPermission('access in-place editing')) { return; } $element = $variables['element']; /** @var $entity \Drupal\Core\E