Esempio n. 1
0
 /**
  * @param int    $id
  * @param string $action
  *
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($id, $action)
 {
     if ($this->roleRepository->roleExists($id) === true) {
         $this->sortOperation->execute($id, $action);
         $this->permissionsCache->getCacheDriver()->deleteAll();
         return $this->redirect()->temporary('acp/permissions');
     }
     throw new Core\Controller\Exception\ResultNotExistsException();
 }
Esempio n. 2
0
 /**
  * @param int    $id
  * @param string $action
  *
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($id, $action)
 {
     if ($this->menuItemRepository->menuItemExists($id) === true) {
         $this->sortOperation->execute($id, $action);
         $this->menusCache->saveMenusCache();
         Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
         return $this->redirect()->temporary('acp/menus');
     }
     throw new Core\Controller\Exception\ResultNotExistsException();
 }