private function findCategory($id_slug) { $category = Category::find()->where(['or', 'category_id=:id_slug', 'slug=:id_slug'], [':id_slug' => $id_slug])->status(Item::STATUS_ON)->one(); return $category ? new CategoryObject($category) : null; }