public function update(Parameters $data, Section $section) { $data = $this->processDate($data); $data = $data->toArray(); $section->populate($data, true); $section->save(); return true; }
protected function getParentId(Section $section, $parentSection = '') { $parentSectionId = null; if (!empty($parentSection)) { $parentSection = $section->loadByTitle($parentSection); $parentSectionId = $parentSection->id; } return $parentSectionId; }