1 | <?php |
||
19 | class AuthItem extends \yii\db\ActiveRecord |
||
20 | { |
||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | public $roles; |
||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | public $permissions; |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | 14 | public static function tableName() |
|
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | 4 | public function attributeLabels() |
|
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | 12 | public function behaviors() |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | public function events() |
||
74 | |||
75 | /** |
||
76 | * @inheritdoc |
||
77 | * @return \app\models\query\AuthItemQuery The active query used by this AR class |
||
78 | */ |
||
79 | public static function find() |
||
83 | |||
84 | /** |
||
85 | * Whether the role is SuperUser |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function isSuperUser(): bool |
||
93 | |||
94 | /** |
||
95 | * Delete auth item. |
||
96 | * WARNING: Impossible delete a superuser. |
||
97 | * |
||
98 | * @return bool |
||
99 | */ |
||
100 | public function beforeDelete() |
||
104 | } |
||
105 |