TYPO3
7.6
|
Public Member Functions | |
__construct () | |
checkAccess () | |
getItem () | |
getDropDown () | |
menuAction (ServerRequestInterface $request, ResponseInterface $response) | |
getAdditionalAttributes () | |
hasDropDown () | |
editFormAction (ServerRequestInterface $request, ResponseInterface $response) | |
removeShortcutAction (ServerRequestInterface $request, ResponseInterface $response) | |
createShortcutAction (ServerRequestInterface $request, ResponseInterface $response) | |
saveFormAction (ServerRequestInterface $request, ResponseInterface $response) | |
getIndex () | |
Public Attributes | |
const | SUPERGLOBAL_GROUP = -100 |
$perms_clause | |
$fieldArray | |
Protected Member Functions | |
initShortcuts () | |
getShortcutsByGroup ($groupId) | |
getShortcutById ($shortcutId) | |
initShortcutGroups () | |
tryAddingTheShortcut (ResponseInterface $response, $url, $shortcutName) | |
addShortcut ($url, $shortcutName, $module) | |
shortcutExists ($url) | |
getShortcutGroupLabel ($groupId) | |
getGlobalShortcutGroups () | |
getGroupsFromShortcuts () | |
getShortcutIcon ($row, $shortcut) | |
getShortcutIconTitle ($shortcutLabel, $moduleName, $parentModuleName= '') | |
getLinkedPageId ($url) | |
getBackendUser () | |
getPageRenderer () | |
getLanguageService () | |
getDatabaseConnection () | |
Protected Attributes | |
$shortcuts | |
$shortcutGroups | |
$groupLabels | |
$iconFactory | |
Class to render the shortcut menu
Definition at line 35 of file ShortcutToolbarItem.php.
__construct | ( | ) |
Constructor
Definition at line 80 of file ShortcutToolbarItem.php.
References $GLOBALS, ShortcutToolbarItem\getLanguageService(), ShortcutToolbarItem\getPageRenderer(), ShortcutToolbarItem\initShortcutGroups(), ShortcutToolbarItem\initShortcuts(), and GeneralUtility\makeInstance().
|
protected |
Add a shortcut now with some user stuffs
string | $url | |
string | $shortcutName | |
string | $module |
Definition at line 647 of file ShortcutToolbarItem.php.
References $GLOBALS, $url, GeneralUtility\_POST(), ShortcutToolbarItem\getBackendUser(), ShortcutToolbarItem\getDatabaseConnection(), and ShortcutToolbarItem\getLanguageService().
Referenced by ShortcutToolbarItem\tryAddingTheShortcut().
checkAccess | ( | ) |
Checks whether the user has access to this toolbar item
Implements ToolbarItemInterface.
Definition at line 109 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\getBackendUser().
createShortcutAction | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
Creates a shortcut through an AJAX call
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 535 of file ShortcutToolbarItem.php.
References $GLOBALS, $url, elseif, GeneralUtility\explodeUrl2Array(), ResourceFactory\getInstance(), ShortcutToolbarItem\getLanguageService(), ShortcutToolbarItem\getLinkedPageId(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), BackendUtility\getRecord(), and ShortcutToolbarItem\tryAddingTheShortcut().
editFormAction | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
Fetches the available shortcut groups, renders a form so it can be saved later on, usually called via AJAX
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 459 of file ShortcutToolbarItem.php.
References $response, ShortcutToolbarItem\$shortcutGroups, ShortcutToolbarItem\getBackendUser(), MessageInterface\getBody(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), ShortcutToolbarItem\getShortcutById(), and MessageInterface\withHeader().
getAdditionalAttributes | ( | ) |
This toolbar item needs no additional attributes
Implements ToolbarItemInterface.
Definition at line 220 of file ShortcutToolbarItem.php.
|
protected |
Returns the current BE user.
Definition at line 911 of file ShortcutToolbarItem.php.
References $GLOBALS.
Referenced by ShortcutToolbarItem\addShortcut(), ShortcutToolbarItem\checkAccess(), ShortcutToolbarItem\editFormAction(), ShortcutToolbarItem\initShortcutGroups(), ShortcutToolbarItem\initShortcuts(), ShortcutToolbarItem\removeShortcutAction(), ShortcutToolbarItem\saveFormAction(), and ShortcutToolbarItem\shortcutExists().
|
protected |
Return DatabaseConnection
Definition at line 941 of file ShortcutToolbarItem.php.
References $GLOBALS.
Referenced by ShortcutToolbarItem\addShortcut(), ShortcutToolbarItem\getShortcutIcon(), ShortcutToolbarItem\initShortcuts(), ShortcutToolbarItem\removeShortcutAction(), ShortcutToolbarItem\saveFormAction(), and ShortcutToolbarItem\shortcutExists().
getDropDown | ( | ) |
Render drop down content
Implements ToolbarItemInterface.
Definition at line 130 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\$shortcuts, ShortcutToolbarItem\getGroupsFromShortcuts(), ShortcutToolbarItem\getLanguageService(), ShortcutToolbarItem\getShortcutsByGroup(), and Icon\SIZE_SMALL.
Referenced by ShortcutToolbarItem\menuAction().
|
protected |
Gets a list of global groups, shortcuts in these groups are available to all users
Definition at line 756 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\initShortcuts().
|
protected |
runs through the available shortcuts an collects their groups
Definition at line 772 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\getDropDown().
getIndex | ( | ) |
Position relative to others, live search should be very right
Implements ToolbarItemInterface.
Definition at line 901 of file ShortcutToolbarItem.php.
getItem | ( | ) |
Render shortcut icon
Implements ToolbarItemInterface.
Definition at line 119 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\getLanguageService(), and Icon\SIZE_SMALL.
|
protected |
Returns LanguageService
Definition at line 931 of file ShortcutToolbarItem.php.
References $GLOBALS.
Referenced by ShortcutToolbarItem\__construct(), ShortcutToolbarItem\addShortcut(), ShortcutToolbarItem\createShortcutAction(), ShortcutToolbarItem\getDropDown(), ShortcutToolbarItem\getItem(), ShortcutToolbarItem\getShortcutIcon(), ShortcutToolbarItem\getShortcutIconTitle(), ShortcutToolbarItem\initShortcutGroups(), and ShortcutToolbarItem\initShortcuts().
|
protected |
Return the ID of the page in the URL if found.
string | $url | The URL of the current shortcut link |
Definition at line 891 of file ShortcutToolbarItem.php.
References $url.
Referenced by ShortcutToolbarItem\createShortcutAction(), and ShortcutToolbarItem\initShortcuts().
|
protected |
Returns current PageRenderer
Definition at line 921 of file ShortcutToolbarItem.php.
References GeneralUtility\makeInstance().
Referenced by ShortcutToolbarItem\__construct().
|
protected |
Gets a shortcut by its uid
int | $shortcutId | Shortcut id to get the complete shortcut for |
Definition at line 388 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\editFormAction(), and ShortcutToolbarItem\removeShortcutAction().
|
protected |
Gets the label for a shortcut group
int | $groupId | A shortcut group id |
Definition at line 746 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\initShortcuts().
|
protected |
Gets the icon for the shortcut
array | $row | |
array | $shortcut |
Definition at line 788 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\$fieldArray, $GLOBALS, BackendUtility\deleteClause(), elseif, ShortcutToolbarItem\getDatabaseConnection(), ShortcutToolbarItem\getLanguageService(), GeneralUtility\isAbsPath(), Icon\SIZE_SMALL, PathUtility\stripPathSitePrefix(), and BackendUtility\versioningPlaceholderClause().
Referenced by ShortcutToolbarItem\initShortcuts().
|
protected |
Returns title for the shortcut icon
string | $shortcutLabel | Shortcut label |
string | $moduleName | Backend module name (key) |
string | $parentModuleName | Parent module label |
Definition at line 866 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\getLanguageService().
Referenced by ShortcutToolbarItem\initShortcuts().
|
protected |
Gets shortcuts for a specific group
int | $groupId | Group Id |
Definition at line 371 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\$shortcuts.
Referenced by ShortcutToolbarItem\getDropDown().
hasDropDown | ( | ) |
This item has a drop down
Implements ToolbarItemInterface.
Definition at line 230 of file ShortcutToolbarItem.php.
|
protected |
Gets the available shortcut groups from default groups, user TSConfig, and global groups
Definition at line 405 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\$shortcutGroups, elseif, ShortcutToolbarItem\getBackendUser(), and ShortcutToolbarItem\getLanguageService().
Referenced by ShortcutToolbarItem\__construct().
|
protected |
Retrieves the shortcuts for the current user
Definition at line 240 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\$shortcuts, MathUtility\canBeInterpretedAsInteger(), elseif, GeneralUtility\explodeUrl2Array(), GeneralUtility\fixed_lgd_cs(), ShortcutToolbarItem\getBackendUser(), ShortcutToolbarItem\getDatabaseConnection(), ShortcutToolbarItem\getGlobalShortcutGroups(), ShortcutToolbarItem\getLanguageService(), ShortcutToolbarItem\getLinkedPageId(), BackendUtility\getRecord(), ShortcutToolbarItem\getShortcutGroupLabel(), ShortcutToolbarItem\getShortcutIcon(), ShortcutToolbarItem\getShortcutIconTitle(), and GeneralUtility\quoteJSvalue().
Referenced by ShortcutToolbarItem\__construct().
menuAction | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
Renders the menu so that it can be returned as response to an AJAX call
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 206 of file ShortcutToolbarItem.php.
References $response, MessageInterface\getBody(), ShortcutToolbarItem\getDropDown(), and MessageInterface\withHeader().
removeShortcutAction | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
Deletes a shortcut through an AJAX call
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 509 of file ShortcutToolbarItem.php.
References $response, ShortcutToolbarItem\getBackendUser(), MessageInterface\getBody(), ShortcutToolbarItem\getDatabaseConnection(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), and ShortcutToolbarItem\getShortcutById().
saveFormAction | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
Gets called when a shortcut is changed, checks whether the user has permissions to do so and saves the changes if everything is ok
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 711 of file ShortcutToolbarItem.php.
References ShortcutToolbarItem\getBackendUser(), MessageInterface\getBody(), ShortcutToolbarItem\getDatabaseConnection(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), and MessageInterface\withHeader().
|
protected |
Exists already a shortcut entry for this TYPO3 url?
string | $url |
Definition at line 683 of file ShortcutToolbarItem.php.
References $url, PreparedStatement\FETCH_ASSOC, ShortcutToolbarItem\getBackendUser(), and ShortcutToolbarItem\getDatabaseConnection().
|
protected |
Try to adding a shortcut
ResponseInterface | $response | |
string | $url | |
string | $shortcutName |
Definition at line 620 of file ShortcutToolbarItem.php.
References $response, $url, GeneralUtility\_POST(), ShortcutToolbarItem\addShortcut(), MessageInterface\getBody(), BackendUtility\shortcutExists(), and MessageInterface\withHeader().
Referenced by ShortcutToolbarItem\createShortcutAction().
$fieldArray |
Definition at line 50 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\getShortcutIcon().
|
protected |
Definition at line 70 of file ShortcutToolbarItem.php.
|
protected |
Definition at line 75 of file ShortcutToolbarItem.php.
$perms_clause |
Definition at line 45 of file ShortcutToolbarItem.php.
|
protected |
Definition at line 62 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\editFormAction(), and ShortcutToolbarItem\initShortcutGroups().
|
protected |
Definition at line 57 of file ShortcutToolbarItem.php.
Referenced by ShortcutToolbarItem\getDropDown(), ShortcutToolbarItem\getShortcutsByGroup(), and ShortcutToolbarItem\initShortcuts().
const SUPERGLOBAL_GROUP = -100 |
integer Number of super global group
Definition at line 40 of file ShortcutToolbarItem.php.