You are here

function panels_flexible_settings_submit in Panels 6.2

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

File

layouts/flexible/flexible.inc, line 236

Code

function panels_flexible_settings_submit(&$values, $display, $layout, $settings) {
  if (empty($settings)) {
    $settings = panels_flexible_default_panels();
  }
  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;
    }
  }
}