public static function Radio8b7c:f320:99b9:690f:4595:cd17:293a:c069preRenderRadio public static Radio8b7c:f320:99b9:690f:4595:cd17:293a:c069preRenderRadio($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 input.html.twig. File
 core/lib/Drupal/Core/Render/Element/Radio.php, line 53  Class
 
Radio  Provides a form element for a single radio button.  Namespace Drupal\Core\Render\Element Code public static function preRenderRadio($element) {
  $element['#attributes']['type'] = 'radio';
  Element8b7c:f320:99b9:690f:4595:cd17:293a:c069setAttributes($element, array('id', 'name', '#return_value' => 'value'));

  if (isset($element['#return_value']) && $element['#value'] !== FALSE && $element['#value'] == $element['#return_value']) {
    $element['#attributes']['checked'] = 'checked';
  }
  stati8b7c:f320:99b9:690f:4595:cd17:293a:c069setAttributes($element, array('form-radio'));

  return $element;
}


    
{'path': 'public/docs/drupal~8/core-lib-drupal-core-render-element-radio.php/function/radio-prerenderradio/8.1.x.html', 'source': 'DevDocs.IO'}