<?php
namespace Modules\Admin\CronJobs\Logs; class Controller extends \App\Mvc\Controller\Window\PaginatedListing\ListingAbstract { protected $listOrderingColumns = ['addTime']; protected function initialize() { parent::initialize(); $this->actionsCfg['viewMessage'] = ['checkSection'=>false, 'checkOption'=>false]; } protected function optionDefineParams(\App\Mvc\View\Utils\RowOptions\Option\Option $option, $selection) { switch($option->getId()){ case 'viewMessage': break; default: return false; } return true; } protected function actionList_getViewObject($R) { $view = parent::actionList_getViewObject($R); $view->setOutputVar('mvcModel', new Model()); return $view; } protected function optionGetEntityName($id) { return ''; } public function actionViewMessage($R) { $view = new View_ViewMessage($this); $class = getClassNamespace(get_class($this)).'\Model'; $model = new $class(); $log = $model->getLogDetails($R['id']); $view->setOutputVar("log", $log); $view->setOutputVar("page", ($R['page']??0)); $view->setOutputVar("id", $R['id']); $view->setPageTitle(sprintf("%s #%s", $view->getPageTitle(), $R['id'])); return new \Engine\Mvc\Response\Html($view->render()); } }