28 const NAME =
'content_unlink';
33 function __construct()
35 parent::__construct(self::NAME, array(
36 self::TITLE => _(
"Unlink upload or folder"),
37 self::MENU_LIST =>
"Organize::Folders::Unlink Content",
39 self::REQUIRES_LOGIN => TRUE
41 $this->folderDao = $GLOBALS[
'container']->get(
'dao.folder');
48 protected function handle(Request $request)
50 $userId = Auth::getUserId();
53 $folderContentId = intval($request->get(
'foldercontent'));
54 if ($folderContentId) {
56 $this->folderDao->removeContent($folderContentId);
57 }
catch (Exception $ex) {
58 $vars[
'message'] = $ex->getMessage();
62 $rootFolderId = $this->folderDao->getRootFolder($userId)->getId();
64 $uiFolderNav = $GLOBALS[
'container']->get(
'ui.folder.nav');
65 $vars[
'folderTree'] = $uiFolderNav->showFolderTree($rootFolderId);
67 return $this->
render(
'admin_content_delete.html.twig', $this->mergeWithDefault($vars));
render($templateName, $vars=null, $headers=null)
#define PERM_ADMIN
Administrator.