/** * Update component params */ public function updateParams() { if ($_POST['color_scheme']) { $data = \CI::$APP->input->post(); $dataToUpdate = array(); $dataToUpdate['color_scheme'] = $data['color_scheme']; if (count($dataToUpdate) > 0) { return parent::updateParams($dataToUpdate); } } }
/** * Update component params */ public function updateParams() { if ($_POST['properties']) { $data = \CI::$APP->input->post(); $dataToUpdate = array(); foreach ($data['properties'] as $property_id => $values) { $dataToUpdate['properties'][] = array('property_id' => $property_id, 'values' => implode(',', $values)); } $dataToUpdate['properties'] = serialize($dataToUpdate['properties']); if (count($dataToUpdate) > 0) { return parent::updateParams($dataToUpdate); } } }
/** * Update component params */ public function updateParams() { if ($_POST['categoriesColumns']) { $data = \CI::$APP->input->post(); $dataToUpdate['columns'] = serialize($data['categoriesColumns']); $dataToUpdate['openLevels'] = serialize($data['openLevels']); if (count($dataToUpdate) > 0) { return parent::updateParams($dataToUpdate); } } }