protected function getChildrenList() { $query = (new Query())->from($this->itemChildTable); $parents = []; foreach ($query->all($this->db) as $row) { $parents[$row['parent']][] = $row['child']; } return $parents; }
/** * @inheritdoc */ protected function getChildrenList() { if ($this->_childrenList === null) { $this->_childrenList = parent::getChildrenList(); } return $this->_childrenList; }