|
@ -142,11 +142,13 @@ class MyModel extends base\MyModel |
|
|
|
|
|
|
|
|
public function fields() |
|
|
public function fields() |
|
|
{ |
|
|
{ |
|
|
$fields = []; |
|
|
|
|
|
|
|
|
$fields = parent::fields(); |
|
|
|
|
|
$flagFields = []; |
|
|
foreach (self::BIT_FLAGS as $bitFlag) { |
|
|
foreach (self::BIT_FLAGS as $bitFlag) { |
|
|
$fields = ArrayHelper::merge($fields, array_combine($bitFlag, $bitFlag)); |
|
|
|
|
|
|
|
|
$flagFields = ArrayHelper::merge($flagFields, array_combine($bitFlag, $bitFlag)); |
|
|
} |
|
|
} |
|
|
return ArrayHelper::merge(parent::fields(), $fields); |
|
|
|
|
|
|
|
|
unset($fields['bit_flag']); |
|
|
|
|
|
return ArrayHelper::merge($fields, $flagFields); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function behaviors() |
|
|
public function behaviors() |
|
|