findAll($type), 'id', 'title'); } /** * @return array|\yii\db\ActiveRecord[] */ public function findAll($type) { return AttachmentCate::find() ->where([ 'type' => $type, 'status' => StatusEnum::ENABLED ]) ->andWhere([ 'merchant_id' => Yii::$app->services->merchant->getNotNullId(), 'store_id' => Yii::$app->services->store->getNotNullId(), ]) ->asArray() ->all(); } }