public function process()
 {
     parent::process();
     if ($this->getRequest()->isMutation()) {
         $A = $this->getAdapter();
         $A->flush();
     }
 }
Exemple #2
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     if (!$this->getRequest()->isValidated()) {
         $this->getAdapter()->setLoader(NULL);
     } else {
         $view->getCommandList()->show();
     }
     if ($this->getRequest()->hasParameter('installSuccess')) {
         $this->getAction('AdminTodo')->emitNotifications = TRUE;
         $this->notifications->message($view->translate('package_success'));
     }
     parent::prepareView($view);
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     if (!$this->getRequest()->isValidated()) {
         $this->getAdapter()->setLoader(NULL);
     } else {
         $view->getCommandList()->show();
     }
     if ($this->getRequest()->hasParameter('installSuccess')) {
         $this->getAction('AdminTodo')->emitNotifications = TRUE;
         $this->notifications->yumSuccess(array('message' => $view->translate('YumSuccess_message'), 'description' => $view->translate('YumSuccess_description'), 'buttonLabel' => $view->translate('YumSuccess_button_label'), 'action' => $view->getModuleUrl('..')));
     } elseif ($this->getRequest()->hasParameter('installFailure')) {
         $taskStatus = $this->systemTasks->getTaskStatus($this->getRequest()->getParameter('taskId'));
         if (isset($taskStatus['children'][0]['message'])) {
             $message = $taskStatus['children'][0]['message'];
         } else {
             $message = $view->translate('An unknown installation error has occurred');
         }
         $this->notifications->yumError(array('message' => $message, 'description' => $view->translate('ClearYumCache_description'), 'buttonLabel' => $view->translate('ClearYumCache_label'), 'action' => $view->getModuleUrl('../ClearYumCache')));
     }
     parent::prepareView($view);
     if (isset($this->yumError)) {
         $this->notifications->yumError(array('message' => $this->yumError, 'description' => $view->translate('ClearYumCache_description'), 'buttonLabel' => $view->translate('ClearYumCache_label'), 'action' => $view->getModuleUrl('../ClearYumCache')));
     }
 }