1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Pages;
13
14 use ICanBoogie\HTTP\Request;
15 use ICanBoogie\Operation;
16
17 class NavigationIncludeOperation extends Operation
18 {
19 protected function get_controls()
20 {
21 return array
22 (
23 self::CONTROL_PERMISSION => Module::PERMISSION_MAINTAIN,
24 self::CONTROL_RECORD => true,
25 self::CONTROL_OWNERSHIP => true
26 )
27
28 + parent::get_controls();
29 }
30
31 public function __invoke(Request $request)
32 {
33 global $core;
34
35 $this->module = $core->modules['pages'];
36
37 return parent::__invoke($request);
38 }
39
40 protected function validate(\ICanboogie\Errors $errors)
41 {
42 return true;
43 }
44
45 protected function process()
46 {
47 $record = $this->record;
48 $record->is_navigation_excluded = false;
49 $record->save();
50
51 return true;
52 }
53 }