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