*/ public array $modules; public static function group(): string { return 'module'; } public static function title(): string { return 'Module'; } public function hasModule(string $module): bool { return in_array($module, $this->modules); } /** * @inheritdoc */ public function rules(): array { return [ 'modules' => 'present|array', 'modules.*' => ['string', Rule::in(Module::values())], ]; } /** * @inheritdoc */ public function meta(): array { return [ ...parent::meta(), 'modules' => Module::forSelect() ]; } }