1 | <?php |
||
32 | abstract class BaseOrganization extends User |
||
33 | { |
||
34 | use SelfBlameableTrait; |
||
35 | |||
36 | const TYPE_ORGANIZATION = 1; |
||
37 | const TYPE_DEPARTMENT = 2; |
||
38 | |||
39 | /** |
||
40 | * @var boolean Organization does not need password and corresponding features. |
||
41 | */ |
||
42 | public $passwordHashAttribute = false; |
||
43 | |||
44 | /** |
||
45 | * @var boolean Organization does not need password and corresponding features. |
||
46 | */ |
||
47 | public $passwordResetTokenAttribute = false; |
||
48 | |||
49 | /** |
||
50 | * @var boolean Organization does not need password and corresponding features. |
||
51 | */ |
||
52 | public $passwordHistoryClass = false; |
||
53 | |||
54 | /** |
||
55 | * @var boolean Organization does not need source. |
||
56 | */ |
||
57 | public $sourceAttribute = false; |
||
58 | |||
59 | /** |
||
60 | * @var boolean Organization does not need auth key. |
||
61 | */ |
||
62 | public $authKeyAttribute = false; |
||
63 | |||
64 | /** |
||
65 | * @var boolean Organization does not need access token. |
||
66 | */ |
||
67 | public $accessTokenAttribute = false; |
||
68 | |||
69 | /** |
||
70 | * |
||
71 | * @var boolean Organization does not need login log. |
||
72 | */ |
||
73 | public $loginLogClass = false; |
||
74 | |||
75 | public $profileClass = Profile::class; |
||
76 | |||
77 | public $memberClass = Member::class; |
||
78 | private $noInitMember; |
||
79 | /** |
||
80 | * @return Member |
||
81 | */ |
||
82 | protected function getNoInitMember() |
||
90 | |||
91 | public function init() |
||
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | public function attributeLabels() |
||
119 | |||
120 | /** |
||
121 | * @inheritdoc |
||
122 | */ |
||
123 | public static function tableName() |
||
127 | |||
128 | abstract protected function typeAttributeBehavior(); |
||
129 | |||
130 | /** |
||
131 | * @inheritdoc |
||
132 | */ |
||
133 | public function behaviors() |
||
137 | |||
138 | abstract protected function getTypeRules(); |
||
139 | |||
140 | public function rules() |
||
144 | |||
145 | /** |
||
146 | * Get Member Query. |
||
147 | * @return MemberQuery |
||
148 | */ |
||
149 | public function getMembers() |
||
153 | |||
154 | /** |
||
155 | * |
||
156 | * @return BaseUserQuery |
||
157 | */ |
||
158 | public function getMemberUsers() |
||
165 | } |
||
166 |