1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Modules;
13
14 use ICanBoogie\Operation;
15
16 use Brickrouge\Button;
17 use Brickrouge\Element;
18
19 use Icybee\Element\ActionbarToolbar;
20
21 class InactivesBlock extends ManageBlock
22 {
23 public function __construct(Module $module, array $attributes=array())
24 {
25 global $core;
26
27 parent::__construct
28 (
29 $module, $attributes + array
30 (
31 self::ENTRIES => $core->modules->disabled_modules_descriptors,
32 self::COLUMNS => array
33 (
34 'key' => __NAMESPACE__ . '\ManageBlock\KeyColumn',
35 'title' => __NAMESPACE__ . '\ManageBlock\TitleColumn',
36 'version' => __NAMESPACE__ . '\ManageBlock\VersionColumn',
37 'dependency' => __NAMESPACE__ . '\ManageBlock\DependencyColumn'
38 )
39 )
40 );
41 }
42
43 protected function attach_buttons()
44 {
45 global $core;
46
47 $core->events->attach(function(ActionbarToolbar\CollectEvent $event, ActionbarToolbar $target) {
48
49 $event->buttons[] = new Button
50 (
51 'Enable selected modules', array
52 (
53 'class' => 'btn-primary btn-danger',
54 'type' => 'submit',
55 'data-target' => '.form-primary'
56 )
57 );
58
59 });
60 }
61 }