TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Opendocs\Controller\OpendocsController Class Reference
Inheritance diagram for TYPO3\CMS\Opendocs\Controller\OpendocsController:
TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface tx_opendocs

Public Member Functions

 __construct (\TYPO3\CMS\Backend\Controller\BackendController &$backendReference=NULL)
 
 checkAccess ()
 
 loadDocsFromUserSession ()
 
 render ()
 
 renderMenu ()
 
 renderMenuEntry ($document, $md5sum, $isRecentDoc=FALSE, $isFirstDoc=FALSE)
 
 getAdditionalAttributes ()
 
 updateNumberOfOpenDocsHook (&$params, $ref)
 
 closeDocument ($params=array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj=NULL)
 
 renderAjax ($params=array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj=NULL)
 

Protected Member Functions

 addJavascriptToBackend ()
 
 addCssToBackend ()
 

Protected Attributes

 $backendReference
 
 $openDocs
 
 $recentDocs
 
 $EXTKEY = 'opendocs'
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Adding a list of all open documents of a user to the backend.php

Author
Benjamin Mack benni.nosp@m.@typ.nosp@m.o3.or.nosp@m.g
Ingo Renner ingo@.nosp@m.typo.nosp@m.3.org

Definition at line 23 of file OpendocsController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Opendocs\Controller\OpendocsController::__construct ( \TYPO3\CMS\Backend\Controller\BackendController $backendReference = NULL)

Member Function Documentation

◆ addCssToBackend()

TYPO3\CMS\Opendocs\Controller\OpendocsController::addCssToBackend ( )
protected

Adds the necessary CSS to the backend

Returns
void

Definition at line 198 of file OpendocsController.php.

Referenced by TYPO3\CMS\Opendocs\Controller\OpendocsController\render().

◆ addJavascriptToBackend()

TYPO3\CMS\Opendocs\Controller\OpendocsController::addJavascriptToBackend ( )
protected

Adds the neccessary javascript to the backend

Returns
void

Definition at line 187 of file OpendocsController.php.

Referenced by TYPO3\CMS\Opendocs\Controller\OpendocsController\render().

◆ checkAccess()

TYPO3\CMS\Opendocs\Controller\OpendocsController::checkAccess ( )

Checks whether the user has access to this toolbar item

Returns
boolean TRUE if user has access, FALSE if not

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface.

Definition at line 54 of file OpendocsController.php.

References $GLOBALS.

◆ closeDocument()

TYPO3\CMS\Opendocs\Controller\OpendocsController::closeDocument (   $params = array(),
\TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL 
)

Closes a document in the session and

Parameters
array$paramsArray of parameters from the AJAX interface, currently unused
\TYPO3\CMS\Core\Http\AjaxRequestHandler$ajaxObjObject of type AjaxRequestHandler
Returns
string List item HTML attibutes

Definition at line 234 of file OpendocsController.php.

References $ajaxObj, $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), and TYPO3\CMS\Opendocs\Controller\OpendocsController\renderAjax().

◆ getAdditionalAttributes()

TYPO3\CMS\Opendocs\Controller\OpendocsController::getAdditionalAttributes ( )

Returns additional attributes for the list item in the toolbar

Returns
string List item HTML attibutes

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface.

Definition at line 178 of file OpendocsController.php.

◆ loadDocsFromUserSession()

TYPO3\CMS\Opendocs\Controller\OpendocsController::loadDocsFromUserSession ( )

Loads the opened and recently opened documents from the user

Returns
void

Definition at line 64 of file OpendocsController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Opendocs\Controller\OpendocsController\__construct().

◆ render()

TYPO3\CMS\Opendocs\Controller\OpendocsController::render ( )

◆ renderAjax()

TYPO3\CMS\Opendocs\Controller\OpendocsController::renderAjax (   $params = array(),
\TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL 
)

Renders the menu so that it can be returned as response to an AJAX call

Parameters
array$paramsArray of parameters from the AJAX interface, currently unused
\TYPO3\CMS\Core\Http\AjaxRequestHandler$ajaxObjObject of type AjaxRequestHandler
Returns
void

Definition at line 259 of file OpendocsController.php.

References $ajaxObj, and TYPO3\CMS\Opendocs\Controller\OpendocsController\renderMenu().

Referenced by TYPO3\CMS\Opendocs\Controller\OpendocsController\closeDocument().

◆ renderMenu()

◆ renderMenuEntry()

TYPO3\CMS\Opendocs\Controller\OpendocsController::renderMenuEntry (   $document,
  $md5sum,
  $isRecentDoc = FALSE,
  $isFirstDoc = FALSE 
)

◆ updateNumberOfOpenDocsHook()

TYPO3\CMS\Opendocs\Controller\OpendocsController::updateNumberOfOpenDocsHook ( $params,
  $ref 
)

Called as a hook in ::setUpdateSignal, calls a JS function to change the number of opened documents

Parameters
array$params
unknown_type$ref
Returns
string list item HTML attibutes

Definition at line 216 of file OpendocsController.php.

Member Data Documentation

◆ $backendReference

TYPO3\CMS\Opendocs\Controller\OpendocsController::$backendReference
protected

◆ $EXTKEY

TYPO3\CMS\Opendocs\Controller\OpendocsController::$EXTKEY = 'opendocs'
protected

Definition at line 36 of file OpendocsController.php.

◆ $openDocs

TYPO3\CMS\Opendocs\Controller\OpendocsController::$openDocs
protected

◆ $recentDocs

TYPO3\CMS\Opendocs\Controller\OpendocsController::$recentDocs
protected