1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Nodes;
13
14 use ICanBoogie\Operation;
15
16 class ExportOperation extends Operation
17 {
18 protected function get_controls()
19 {
20 return [
21
22 self::CONTROL_PERMISSION => Module::PERMISSION_ADMINISTER
23
24 ] + parent::get_controls();
25 }
26
27 protected function validate(\ICanboogie\Errors $errors)
28 {
29 return true;
30 }
31
32 protected function process()
33 {
34 global $core;
35
36 $records = $this->module->model->filter_by_siteid($core->site_id)->own->all(\PDO::FETCH_OBJ);
37
38 foreach ($records as $record)
39 {
40 $by_id[$record->nid] = $record;
41
42 unset($record->nid);
43 }
44
45 return $by_id;
46 }
47 }