You are here

function panels_flexible_settings_submit in Panels 5.2

Same name and namespace in other branches
  1. 6.2 layouts/flexible/flexible.inc \panels_flexible_settings_submit()
1 string reference to 'panels_flexible_settings_submit'
panels_flexible_panels_layouts in layouts/flexible.inc
implementation of hook_panels_layouts

File

layouts/flexible.inc, line 231

Code

function panels_flexible_settings_submit(&$values, $display, $layout, $settings) {
  for ($row = 1; $row <= $values['rows']; $row++) {
    if ($row > $settings['rows'] && empty($values["row_{$row}"]['columns'])) {
      $values["row_{$row}"]['columns'] = 1;
      $values["row_{$row}"]['width_1'] = 100;
    }
    if (!empty($values["row_{$row}"]['names'])) {
      $names = explode(',', $values["row_{$row}"]['names']);
      foreach ($names as $nid => $name) {
        $names[$nid] = trim($name);
      }
      $values["row_{$row}"]['names'] = $names;
    }
  }
}