Paperyard
Subjects.php
Go to the documentation of this file.
1 <?php
2 
4 
11 
17 {
24  public function __construct(Twig $view, LoggerInterface $logger, Messages $flash)
25  {
26  $this->view = $view;
27  $this->logger = $logger;
28  $this->flash = $flash;
29 
30  $this->registerPlugin('datatables.min');
31  }
32 
39  public function __invoke(Request $request, Response $response, $args)
40  {
41 
42  // show rule list
43  $this->view->render($response, 'rule/subjects.twig', $this->render());
44  return $response;
45  }
46 
51  public function render()
52  {
53  return array(
54  'plugins' => parent::getPlugins(),
55  'rules' => \Paperyard\Models\Rule\Subjects::all(),
56  'languageFlag' => parent::getLanguageFlag()
57  );
58  }
59 }
__invoke(Request $request, Response $response, $args)
Definition: Subjects.php:39
__construct(Twig $view, LoggerInterface $logger, Messages $flash)
Definition: Subjects.php:24
registerPlugin($name, $type=PluginType::NORMAL)