public function reOrderSection(array $sectionOrder) { if ($sectionOrder === null || !is_array($sectionOrder) || count($sectionOrder) === 0) { return false; } $sectionNameList = array_keys($sectionOrder); $sections = $this->sectionDao->findBySectionNameList($sectionNameList); foreach ($sections as $key => $section) { if (isset($sectionOrder[$section->name])) { $sections[$key]->sortOrder = $sectionOrder[$section->name]; } } return $this->sectionDao->batchReplace($sections); }