public static function getArticleToc($id = null, $status = [Section::STATUS_DRAFT, Section::STATUS_PUBLISH]) { $query = new Query(); $query->select(['id', 'title', 'ancestor', 'parent', 'next', 'prev', 'ver'])->from(Section::tableName())->where(['parent' => $id, 'toc_mode' => Section::TOC_MODE_NORMAL, 'status' => $status])->indexBy('id'); return $query->all(); }