public static function getTree(&$array) { $root = new SubpageUpdateLRTreeNode(); $root->init($array); return $root; }
protected function handleSaveRequest() { $this->errorMessageContainer = $this->form->getValidationResults(); if (!$this->errorMessageContainer->isAnyErrorMessage()) { $fieldValue = $this->form->getField('menuStructure')->getValue(); if (!empty($fieldValue)) { parse_str(str_replace('&', '&', $fieldValue), $newStructure); $newStructure['id'] = $this->rootId; $tree = SubpageUpdateLRTreeNode::getTree($newStructure); $tree->updateRecords($this->recordList); foreach ($this->recordList as $record) { $this->dao->updateNodePosition($record); } } $this->redirectAddress = CoreServices::get('url')->getCurrentPageUrl('_sm', 'Save'); } }