public function __construct(Module $module, array $attributes = array()) { global $core; $this->module = $module; if (!$core->user->has_permission(Module::PERMISSION_ADMINISTER, $module)) { throw new HTTPException("You don't have permission to administer modules.", array(), 403); } parent::__construct($attributes + array(self::ENTRIES => array_values($core->modules->enabled_modules_descriptors), self::COLUMNS => array('key' => __CLASS__ . '\\KeyColumn', 'title' => __CLASS__ . '\\TitleColumn', 'version' => __CLASS__ . '\\VersionColumn', 'dependency' => __CLASS__ . '\\DependencyColumn', 'install' => __CLASS__ . '\\InstallColumn', 'configure' => __CLASS__ . '\\ConfigureColumn'), 'class' => 'form-primary')); $this->attach_buttons(); }
public function __construct(array $attributes = []) { parent::__construct($attributes + [self::COLUMNS => ['id' => [__CLASS__ . '\\KeyColumn', ['title' => $this->t("ID")]], 'name' => [__CLASS__ . '\\NameColumn', ['title' => $this->t("Name")]], 'created' => [__CLASS__ . '\\CreatedColumn', ['title' => $this->t("Publication date")]], 'category' => [__CLASS__ . '\\CategoryColumn', ['title' => $this->t("Category")]], 'actions' => [__CLASS__ . '\\ActionsColumn', ['title' => $this->t("Actions")]]]]); }
public function __construct(Module $module, array $attributes = array()) { $this->module = $module; $this->collection = Collection::get(); parent::__construct($attributes + array(self::COLUMNS => array('is_active' => __CLASS__ . '\\IsActiveColumn', 'title' => __CLASS__ . '\\TitleColumn', 'configuration' => __CLASS__ . '\\ConfigurationColumn', 'usage' => __CLASS__ . '\\UsageColumn', 'clear' => __CLASS__ . '\\ClearColumn'), self::ENTRIES => $this->collection)); }