‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton:
TYPO3\CMS\Backend\Template\Components\Buttons\ButtonInterface TYPO3\CMS\Backend\Template\Components\Buttons\PositionInterface

Public Member Functions

string getModuleName ()
 
ShortcutButton setModuleName ($moduleName)
 
string getDisplayName ()
 
ShortcutButton setDisplayName ($displayName)
 
array getSetVariables ()
 
ShortcutButton setSetVariables (array $setVariables)
 
array getGetVariables ()
 
ShortcutButton setGetVariables (array $getVariables)
 
string getPosition ()
 
int getGroup ()
 
string getType ()
 
bool isValid ()
 
string __toString ()
 
string render ()
 

Protected Member Functions

 preProcess ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

string $moduleName
 
string $displayName
 
array $setVariables = array( )
 
array $getVariables = array( )
 
ControllerContext $controllerContext
 

Detailed Description

ShortcutButton

Renders a shortcut button in the DocHeader which will be rendered to the right position using button group "91".

EXAMPLE USAGE TO ADD A SHORTCUT BUTTON:

$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar(); $myButton = $buttonBar->makeShortcutButton() ->setModuleName('my_info'); $buttonBar->addButton($myButton);

Definition at line 39 of file ShortcutButton.php.

Member Function Documentation

◆ __toString()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::__toString ( )

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getBackendUser ( )
protected
Returns
‪BackendUserAuthentication

Definition at line 257 of file ShortcutButton.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\render().

◆ getDisplayName()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getDisplayName ( )

Gets the display name of the module.

Returns
‪string

Definition at line 88 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$displayName.

◆ getGetVariables()

array TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getGetVariables ( )

Gets the GET variables.

Returns
‪array

Definition at line 132 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$getVariables.

◆ getGroup()

int TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getGroup ( )

Gets the button group.

Returns
‪int

Implements TYPO3\CMS\Backend\Template\Components\Buttons\PositionInterface.

Definition at line 164 of file ShortcutButton.php.

◆ getModuleName()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getModuleName ( )

Gets the name of the module.

Returns
‪string

Definition at line 66 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$moduleName.

◆ getPosition()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getPosition ( )

◆ getSetVariables()

array TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getSetVariables ( )

Gets the SET variables.

Returns
‪array

Definition at line 110 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$setVariables.

◆ getType()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::getType ( )

Gets the type of the button

Returns
‪string

Implements TYPO3\CMS\Backend\Template\Components\Buttons\ButtonInterface.

Definition at line 174 of file ShortcutButton.php.

◆ isValid()

bool TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::isValid ( )

Determines whether the button shall be rendered. Depends on the backend user permission to create shortcuts and the defined module name.

Returns
‪bool

Implements TYPO3\CMS\Backend\Template\Components\Buttons\ButtonInterface.

Definition at line 186 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\preProcess().

◆ preProcess()

TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::preProcess ( )
protected

Pre-processes class member values.

Definition at line 232 of file ShortcutButton.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\isValid().

◆ render()

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::render ( )

◆ setDisplayName()

ShortcutButton TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::setDisplayName (   $displayName)

Sets the display name of the module.

Parameters
string$displayName
Returns
ShortcutButton

Definition at line 99 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$displayName.

Referenced by TYPO3\CMS\Backend\ViewHelpers\ModuleLayout\Button\ShortcutButtonViewHelper\createButton().

◆ setGetVariables()

ShortcutButton TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::setGetVariables ( array  $getVariables)

◆ setModuleName()

ShortcutButton TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::setModuleName (   $moduleName)

◆ setSetVariables()

ShortcutButton TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::setSetVariables ( array  $setVariables)

Sets the SET variables.

Parameters
array$setVariables
Returns
ShortcutButton

Definition at line 121 of file ShortcutButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton\$setVariables.

Member Data Documentation

◆ $controllerContext

ControllerContext TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::$controllerContext
protected

Definition at line 59 of file ShortcutButton.php.

◆ $displayName

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::$displayName
protected

◆ $getVariables

array TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::$getVariables = array( )
protected

◆ $moduleName

string TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::$moduleName
protected

◆ $setVariables

array TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton::$setVariables = array( )
protected