You are here

function _views_row_insert_process_radios in Views Row Insert 8

Processing Radios Element using #after_build property.

Parameters

array $element: Contains option elements.

object $form_state: Form object.

Return value

array Returns array.

1 string reference to '_views_row_insert_process_radios'
ViewsRowInsert::buildOptionsForm in src/Plugin/views/style/ViewsRowInsert.php
Provide a form to edit options for this plugin.

File

./views_row_insert.module, line 90
Contains views_row_insert.module.

Code

function _views_row_insert_process_radios(array $element, $form_state) {
  $options = array_keys($element['#options']);
  foreach ($options as $values) {
    $element[$values]['#attributes']['class'][] = $values;
  }
  return $element;
}