public function filter($condition) { $items = $this->find()->where($condition)->all(); $this->_filter = $this->_getTreeNodesIds($items); }