1 <?php
 2 
 3 /**
 4  * @package redaxo\structure\content
 5  */
 6 class rex_module_perm extends rex_complex_perm
 7 {
 8     public function hasPerm($module_id)
 9     {
10         return $this->hasAll() || in_array($module_id, $this->perms);
11     }
12 
13     public static function getFieldParams()
14     {
15         return [
16             'label' => rex_i18n::msg('modules'),
17             'all_label' => rex_i18n::msg('all_modules'),
18             'sql_options' => 'select name, id from ' . rex::getTablePrefix() . 'module order by name',
19         ];
20     }
21 }
22