TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TaskModuleController Class Reference
Inheritance diagram for TaskModuleController:
BaseScriptClass

Public Member Functions

 __construct ()
 
 menuConfig ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 main ()
 
 printContent ()
 
 description ($title, $description= '')
 
 renderListMenu ($items, $mainMenu=false)
 
 urlInIframe ($url)
 
 getModuleTemplate ()
 
- Public Member Functions inherited from BaseScriptClass
 init ()
 
 menuConfig ()
 
 mergeExternalItems ($modName, $menuKey, $menuArr)
 
 handleExternalFunctionValue ($MM_key= 'function', $MS_value=null)
 
 getExternalItemConfig ($modName, $menuKey, $value= '')
 
 checkExtObj ()
 
 checkSubExtObj ()
 
 extObjHeader ()
 
 extObjContent ()
 

Protected Member Functions

 generateMenu ()
 
 renderModuleContent ()
 
 renderInformationContent ()
 
 indexAction ()
 
 getButtons ()
 
 checkAccess ($extKey, $taskClass)
 
 getUniqueKey ($string)
 
 openInNewWindow ()
 
 getBackendUser ()
 
 getLanguageService ()
 
- Protected Member Functions inherited from BaseScriptClass
 getLanguageService ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getPageRenderer ()
 

Protected Attributes

 $pageinfo
 
 $moduleTemplate
 
 $moduleName = 'user_task'
 
- Protected Attributes inherited from BaseScriptClass
 $pageRenderer = null
 

Additional Inherited Members

- Public Attributes inherited from BaseScriptClass
 $MCONF = array()
 
 $id
 
 $CMD
 
 $perms_clause
 
 $MOD_MENU
 
 $MOD_SETTINGS = array()
 
 $modTSconfig
 
 $modMenu_type = ''
 
 $modMenu_dontValidateList = ''
 
 $modMenu_setDefaultList = ''
 
 $extClassConf
 
 $content = ''
 
 $doc
 
 $extObj
 

Detailed Description

This class provides a taskcenter for BE users

Definition at line 33 of file TaskModuleController.php.

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

checkAccess (   $extKey,
  $taskClass 
)
protected

Check the access to a task. Considered are:

  • Admins are always allowed
  • Tasks can be restriced to admins only
  • Tasks can be blinded for Users with TsConfig taskcenter.<extensionkey>.<taskName> = 0
Parameters
string$extKeyExtension key
string$taskClassName of the task
Returns
bool Access to the task allowed or not

Definition at line 450 of file TaskModuleController.php.

References $GLOBALS, and TaskModuleController\getBackendUser().

Referenced by TaskModuleController\indexAction(), and TaskModuleController\renderModuleContent().

description (   $title,
  $description = '' 
)

Render the headline of a task including a title and an optional description.

Parameters
string$titleTitle
string$descriptionDescription
Returns
string formatted title and description

Definition at line 255 of file TaskModuleController.php.

References BaseScriptClass\$content.

Referenced by TaskModuleController\renderInformationContent().

generateMenu ( )
protected

Generates the menu based on $this->MOD_MENU

Exceptions
\InvalidArgumentException

Definition at line 94 of file TaskModuleController.php.

Referenced by TaskModuleController\main().

getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 513 of file TaskModuleController.php.

References $GLOBALS.

Referenced by TaskModuleController\checkAccess(), TaskModuleController\renderInformationContent(), and TaskModuleController\renderListMenu().

getButtons ( )
protected

Create the panel of buttons for submitting the form or otherwise perform operations.

Returns
void

Definition at line 418 of file TaskModuleController.php.

References $url, ButtonBar\BUTTON_POSITION_RIGHT, GeneralUtility\getIndpEnv(), TaskModuleController\getLanguageService(), GeneralUtility\quoteJSvalue(), and Icon\SIZE_SMALL.

Referenced by TaskModuleController\main().

getLanguageService ( )
protected
getModuleTemplate ( )
Returns
ModuleTemplate

Definition at line 531 of file TaskModuleController.php.

References TaskModuleController\$moduleTemplate.

getUniqueKey (   $string)
protected

Create a unique key from a string which can be used in JS for sorting Therefore '_' are replaced

Parameters
string$stringstring which is used to generate the identifier
Returns
string Modified string

Definition at line 486 of file TaskModuleController.php.

Referenced by TaskModuleController\indexAction(), and TaskModuleController\renderListMenu().

indexAction ( )
protected
main ( )

Creates the module's content. In this case it rather acts as a kind of # dispatcher redirecting requests to specific tasks.

Returns
void

Definition at line 146 of file TaskModuleController.php.

References TaskModuleController\generateMenu(), TaskModuleController\getButtons(), TaskModuleController\getLanguageService(), TaskModuleController\renderInformationContent(), and TaskModuleController\renderModuleContent().

Referenced by TaskModuleController\mainAction().

mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Injects the request object for the current request or subrequest Simply calls main() and writes the content to the response

Parameters
ServerRequestInterface$requestthe current request
ResponseInterface$response
Returns
ResponseInterface the response with the content

Definition at line 129 of file TaskModuleController.php.

References $GLOBALS, $response, MessageInterface\getBody(), and TaskModuleController\main().

menuConfig ( )

Adds items to the ->MOD_MENU array. Used for the function menu selector.

Returns
void

Definition at line 73 of file TaskModuleController.php.

References TaskModuleController\getLanguageService(), BackendUtility\getModTSconfig(), BaseScriptClass\mergeExternalItems(), and BackendUtility\unsetMenuItems().

openInNewWindow ( )
protected

This method prepares the link for opening the devlog in a new window

Returns
string Hyperlink with icon and appropriate JavaScript

Definition at line 498 of file TaskModuleController.php.

References BaseScriptClass\$content, $url, GeneralUtility\getIndpEnv(), TaskModuleController\getLanguageService(), GeneralUtility\quoteJSvalue(), and Icon\SIZE_SMALL.

printContent ( )

Prints out the module's HTML

Returns
void

Definition at line 171 of file TaskModuleController.php.

References BaseScriptClass\$content.

renderInformationContent ( )
protected
renderListMenu (   $items,
  $mainMenu = false 
)

Render a list of items as a nicely formated definition list including a link, icon, title and description. The keys of a single item are:

  • title: Title of the item
  • link: Link to the task
  • icon: Path to the icon or Icon as HTML if it begins with <img
  • description: Description of the task, using htmlspecialchars()
  • descriptionHtml: Description allowing HTML tags which will override the description
Parameters
array$itemsList of items to be displayed in the definition list.
bool$mainMenuSet it to TRUE to render the main menu
Returns
string Fefinition list

Definition at line 279 of file TaskModuleController.php.

References BaseScriptClass\$content, BaseScriptClass\$id, elseif, PathUtility\getAbsoluteWebPath(), TaskModuleController\getBackendUser(), GeneralUtility\getFileAbsFileName(), BaseScriptClass\getPageRenderer(), and TaskModuleController\getUniqueKey().

Referenced by TaskModuleController\indexAction().

renderModuleContent ( )
protected
urlInIframe (   $url)

Returns HTML code to dislay an url in an iframe at the right side of the taskcenter

Parameters
string$urlUrl to display
Returns
string Code that inserts the iframe (HTML)

Definition at line 474 of file TaskModuleController.php.

References $url.

Member Data Documentation

$moduleName = 'user_task'
protected

Definition at line 52 of file TaskModuleController.php.

$moduleTemplate
protected

Definition at line 45 of file TaskModuleController.php.

Referenced by TaskModuleController\getModuleTemplate().

$pageinfo
protected

Definition at line 38 of file TaskModuleController.php.