TYPO3 API  SVNRelease
Public Member Functions | Protected Member Functions | Protected Attributes
ShortcutMenu Class Reference
Inheritance diagram for ShortcutMenu:
Inheritance graph
[legend]
Collaboration diagram for ShortcutMenu:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 __construct (TYPO3backend &$backendReference=null)
 checkAccess ()
 render ()
 renderMenu ()
 renderAjax ($params=array(), TYPO3AJAX &$ajaxObj=null)
 getAdditionalAttributes ()
 getAjaxShortcutGroups ($params=array(), TYPO3AJAX &$ajaxObj=null)
 deleteAjaxShortcut ($params=array(), TYPO3AJAX &$ajaxObj=null)
 createAjaxShortcut ($params=array(), TYPO3AJAX &$ajaxObj=null)
 setAjaxShortcut ($params=array(), TYPO3AJAX &$ajaxObj=null)

Protected Member Functions

 addJavascriptToBackend ()
 initShortcuts ()
 getShortcutsByGroup ($groupId)
 getShortcutById ($shortcutId)
 initShortcutGroups ($params=array(), TYPO3AJAX &$ajaxObj=null)
 getShortcutGroupLabel ($groupId)
 getGlobalShortcutGroups ()
 getGroupsFromShortcuts ()
 getShortcutIcon ($row, $shortcut)
 getShortcutIconTitle ($shortcutLabel, $moduleName, $parentModuleName= '')
 getLinkedPageId ($url)

Protected Attributes

 $shortcutGroups
 $shortcuts
 $groupLabels
 $backendReference

Detailed Description

Definition at line 47 of file class.shortcutmenu.php.


Constructor & Destructor Documentation

ShortcutMenu::__construct ( TYPO3backend &$  backendReference = null)

constructor

Parameters:
TYPO3backendTYPO3 backend object reference
Returns:
void

Implements backend_toolbarItem.

Definition at line 79 of file class.shortcutmenu.php.

References $backendReference, initShortcutGroups(), and initShortcuts().


Member Function Documentation

ShortcutMenu::addJavascriptToBackend ( ) [protected]

adds the necessary JavaScript to the backend

Returns:
void

Definition at line 238 of file class.shortcutmenu.php.

Referenced by render().

ShortcutMenu::checkAccess ( )

checks whether the user has access to this toolbar item

Returns:
boolean true if user has access, false if not

Implements backend_toolbarItem.

Definition at line 101 of file class.shortcutmenu.php.

References $GLOBALS, and t3lib_div\deprecationLog().

ShortcutMenu::createAjaxShortcut ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
)

creates a shortcut through an AJAX call

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
void

Definition at line 510 of file class.shortcutmenu.php.

References $ajaxObj, $GLOBALS, $module, $TCA, t3lib_div\_POST(), t3lib_div\explodeUrl2Array(), getLinkedPageId(), t3lib_BEfunc\getRecord(), and t3lib_div\testInt().

ShortcutMenu::deleteAjaxShortcut ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
)

deletes a shortcut through an AJAX call

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
void

Definition at line 484 of file class.shortcutmenu.php.

References $ajaxObj, $GLOBALS, t3lib_div\_POST(), and getShortcutById().

ShortcutMenu::getAdditionalAttributes ( )

returns additional attributes for the list item in the toolbar

Returns:
string list item HTML attibutes

Implements backend_toolbarItem.

Definition at line 247 of file class.shortcutmenu.php.

ShortcutMenu::getAjaxShortcutGroups ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
)

gets the available shortcut groups

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
void

Definition at line 462 of file class.shortcutmenu.php.

References $ajaxObj, $GLOBALS, and $shortcutGroups.

ShortcutMenu::getGlobalShortcutGroups ( ) [protected]

gets a list of global groups, shortcuts in these groups are available to all users

Returns:
array array of global groups

Definition at line 653 of file class.shortcutmenu.php.

Referenced by initShortcuts().

ShortcutMenu::getGroupsFromShortcuts ( ) [protected]

runs through the available shortcuts an collects their groups

Returns:
array array of groups which have shortcuts

Definition at line 670 of file class.shortcutmenu.php.

Referenced by renderMenu().

ShortcutMenu::getLinkedPageId ( url) [protected]

Return the ID of the page in the URL if found.

Parameters:
stringThe URL of the current shortcut link
Returns:
string If a page ID was found, it is returned. Otherwise: 0

Definition at line 807 of file class.shortcutmenu.php.

Referenced by createAjaxShortcut(), and initShortcuts().

ShortcutMenu::getShortcutById ( shortcutId) [protected]

gets a shortcut by its uid

Parameters:
integershortcut id to get the complete shortcut for
Returns:
mixed an array containing the shortcut's data on success or false on failure

Definition at line 368 of file class.shortcutmenu.php.

Referenced by deleteAjaxShortcut().

ShortcutMenu::getShortcutGroupLabel ( groupId) [protected]

gets the label for a shortcut group

Parameters:
integera shortcut group id
Returns:
string the shortcut group label, can be an empty string if no group was found for the id

Definition at line 638 of file class.shortcutmenu.php.

Referenced by initShortcuts().

ShortcutMenu::getShortcutIcon ( row,
shortcut 
) [protected]

gets the icon for the shortcut

Parameters:
stringbackend module name
Returns:
string shortcut icon as img tag

Definition at line 686 of file class.shortcutmenu.php.

References $GLOBALS, $TCA, t3lib_BEfunc\deleteClause(), t3lib_iconWorks\getIcon(), t3lib_div\isAbsPath(), t3lib_extMgm\isLoaded(), t3lib_iconWorks\skinImg(), and t3lib_BEfunc\versioningPlaceholderClause().

Referenced by initShortcuts().

ShortcutMenu::getShortcutIconTitle ( shortcutLabel,
moduleName,
parentModuleName = '' 
) [protected]

Returns title for the shortcut icon

Parameters:
stringshortcut label
stringbackend module name (key)
stringparent module label
Returns:
string title for the shortcut icon

Definition at line 778 of file class.shortcutmenu.php.

References $GLOBALS.

Referenced by initShortcuts().

ShortcutMenu::getShortcutsByGroup ( groupId) [protected]

gets shortcuts for a specific group

Parameters:
integergroup Id
Returns:
array array of shortcuts that matched the group

Definition at line 350 of file class.shortcutmenu.php.

Referenced by renderMenu().

ShortcutMenu::initShortcutGroups ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
) [protected]

gets the available shortcut groups from default gropups, user TSConfig, and global groups

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
array

Definition at line 389 of file class.shortcutmenu.php.

References $GLOBALS.

Referenced by __construct().

ShortcutMenu::initShortcuts ( ) [protected]
ShortcutMenu::render ( )

Creates the shortcut menu (default renderer)

Returns:
string workspace selector as HTML select

Implements backend_toolbarItem.

Definition at line 118 of file class.shortcutmenu.php.

References $GLOBALS, addJavascriptToBackend(), t3lib_iconWorks\getSpriteIcon(), and renderMenu().

ShortcutMenu::renderAjax ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
)

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

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
void

Definition at line 227 of file class.shortcutmenu.php.

References $ajaxObj, and renderMenu().

ShortcutMenu::renderMenu ( )

renders the pure contents of the menu

Returns:
string the menu's content

Definition at line 139 of file class.shortcutmenu.php.

References $GLOBALS, $shortcuts, getGroupsFromShortcuts(), getShortcutsByGroup(), and t3lib_iconWorks\getSpriteIcon().

Referenced by render(), and renderAjax().

ShortcutMenu::setAjaxShortcut ( params = array(),
TYPO3AJAX &$  ajaxObj = null 
)

gets called when a shortcut is changed, checks whether the user has permissions to do so and saves the changes if everything is ok

Parameters:
arrayarray of parameters from the AJAX interface, currently unused
TYPO3AJAXobject of type TYPO3AJAX
Returns:
void

Definition at line 593 of file class.shortcutmenu.php.

References $ajaxObj, $GLOBALS, and t3lib_div\_POST().


Member Data Documentation

ShortcutMenu::$backendReference [protected]

Definition at line 71 of file class.shortcutmenu.php.

Referenced by __construct().

ShortcutMenu::$groupLabels [protected]

Definition at line 64 of file class.shortcutmenu.php.

ShortcutMenu::$shortcutGroups [protected]

Definition at line 49 of file class.shortcutmenu.php.

Referenced by getAjaxShortcutGroups().

ShortcutMenu::$shortcuts [protected]

Definition at line 56 of file class.shortcutmenu.php.

Referenced by initShortcuts(), and renderMenu().


The documentation for this class was generated from the following file: