1 layout.theme.inc theme_layout_flexible_template_style_option($variables)

Outputs a representation of the column widths of a flexible layout template row.

File

core/modules/layout/layout.theme.inc, line 156
Theme functions for the Layout module.

Code

function theme_layout_flexible_template_style_option($variables) {
  $row_style = $variables['row_style'];
  if ($row_style['region_count'] == 1) {
    $regions = array('12');
    $percent = array('100');
  }
  else {
    $regions = explode(':', $row_style['bootstrap']);
    $percent = explode(':', $row_style['split']);
  }
  $output = '';
  $output .= '<div class="flexible-icon container">';
  $output .= '<div class="flexible-icon-row row">';
  foreach ($regions as $index => $region) {
    $output .= '<div class="flexible-icon-region col-md-' . $region . '">' . $percent[$index] . '%</div>';
  }
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}