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 49 of file class.shortcutmenu.php.


Constructor & Destructor Documentation

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

constructor

Parameters:
TYPO3backend TYPO3 backend object reference
Returns:
void

Implements backend_toolbarItem.

Definition at line 81 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 229 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 103 of file class.shortcutmenu.php.

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

creates a shortcut through an AJAX call

Parameters:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
void

Definition at line 492 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:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
void

Definition at line 466 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 238 of file class.shortcutmenu.php.

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

gets the available shortcut groups

Parameters:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
void

Definition at line 444 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 632 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 649 of file class.shortcutmenu.php.

Referenced by renderMenu().

ShortcutMenu::getLinkedPageId ( url  )  [protected]

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

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

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

Referenced by createAjaxShortcut(), and initShortcuts().

ShortcutMenu::getShortcutById ( shortcutId  )  [protected]

gets a shortcut by its uid

Parameters:
integer shortcut 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 359 of file class.shortcutmenu.php.

Referenced by deleteAjaxShortcut().

ShortcutMenu::getShortcutGroupLabel ( groupId  )  [protected]

gets the label for a shortcut group

Parameters:
integer a 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 617 of file class.shortcutmenu.php.

Referenced by initShortcuts().

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

gets the icon for the shortcut

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

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

References $GLOBALS, $row, $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:
string shortcut label
string backend module name (key)
string parent module label
Returns:
string title for the shortcut icon

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

References $GLOBALS.

Referenced by initShortcuts().

ShortcutMenu::getShortcutsByGroup ( groupId  )  [protected]

gets shortcuts for a specific group

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

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

References $shortcuts.

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:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
array

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

References $GLOBALS.

Referenced by __construct().

ShortcutMenu::initShortcuts (  )  [protected]

retrieves the shortcuts for the current user

Returns:
array array of shortcuts

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

References $GLOBALS, $res, $row, $shortcuts, t3lib_div::explodeUrl2Array(), t3lib_div::fixed_lgd(), getGlobalShortcutGroups(), getLinkedPageId(), t3lib_BEfunc::getRecord(), getShortcutGroupLabel(), getShortcutIcon(), getShortcutIconTitle(), and t3lib_div::testInt().

Referenced by __construct().

ShortcutMenu::render (  ) 

Creates the shortcut menu (default renderer)

Returns:
string workspace selector as HTML select

Implements backend_toolbarItem.

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

References $GLOBALS, addJavascriptToBackend(), 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:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
void

Definition at line 218 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 132 of file class.shortcutmenu.php.

References $GLOBALS, $shortcuts, getGroupsFromShortcuts(), getShortcutsByGroup(), and nbsp.

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:
array array of parameters from the AJAX interface, currently unused
TYPO3AJAX object of type TYPO3AJAX
Returns:
void

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

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


Member Data Documentation

ShortcutMenu::$backendReference [protected]

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

Referenced by __construct().

ShortcutMenu::$groupLabels [protected]

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

ShortcutMenu::$shortcutGroups [protected]

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

Referenced by getAjaxShortcutGroups().

ShortcutMenu::$shortcuts [protected]

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

Referenced by getShortcutsByGroup(), initShortcuts(), and renderMenu().


The documentation for this class was generated from the following file:
Generated on Sat Jan 3 04:23:44 2009 for TYPO3 API by  doxygen 1.4.7