jjzjj

ActiveController

全部标签

php - Yii2 - 在其余 ActiveController 中覆盖 checkAccess

Product.supplierID=Supplier.supplierID-------------------|Product|---------|Supplier|-------------------||Supplier.supplierID=User.supplierID|---------|User|---------使用上面的表结构,应用程序使用ActiveController的子类,重载prepareDataProvider来限制每个index列表Product登录的User可以查看具有匹配supplierID值的那些。ProductController的actions