Paperyard
Public Member Functions | List of all members
Paperyard\Controllers\Rule\Archives Class Reference
Inheritance diagram for Paperyard\Controllers\Rule\Archives:
Paperyard\Controllers\BasicController

Public Member Functions

 __construct (Twig $view, LoggerInterface $logger, Messages $flash)
 
 __invoke (Request $request, Response $response, $args)
 
 render ()
 
- Public Member Functions inherited from Paperyard\Controllers\BasicController
 getPlugins ()
 
 registerPlugin ($name, $type=PluginType::NORMAL)
 
 getLanguageFlag ()
 

Additional Inherited Members

- Protected Attributes inherited from Paperyard\Controllers\BasicController
 $view
 
 $logger
 
 $flash
 

Detailed Description

Definition at line 16 of file Archives.php.

Constructor & Destructor Documentation

Paperyard\Controllers\Rule\Archives::__construct ( Twig  $view,
LoggerInterface  $logger,
Messages  $flash 
)

Archives constructor.

Parameters
Twig$view
LoggerInterface$logger
Messages$flash

Definition at line 24 of file Archives.php.

25  {
26  $this->view = $view;
27  $this->logger = $logger;
28  $this->flash = $flash;
29 
30  $this->registerPlugin('datatables.min');
31  }
registerPlugin($name, $type=PluginType::NORMAL)

Member Function Documentation

Paperyard\Controllers\Rule\Archives::__invoke ( Request  $request,
Response  $response,
  $args 
)
Parameters
Request$request
Response$response
$args
Returns
Response

Definition at line 39 of file Archives.php.

40  {
41 
42  // show rule list
43  $this->view->render($response, 'rule/archives.twig', $this->render());
44  return $response;
45  }
Paperyard\Controllers\Rule\Archives::render ( )

render

Returns
array data to render the view

Definition at line 51 of file Archives.php.

52  {
53  return array(
54  'plugins' => parent::getPlugins(),
55  'rules' => \Paperyard\Models\Rule\Archive::all(),
56  'languageFlag' => parent::getLanguageFlag()
57  );
58  }

The documentation for this class was generated from the following file: