TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ShortcutButton Class Reference
Inheritance diagram for ShortcutButton:
ButtonInterface PositionInterface

Public Member Functions

 getModuleName ()
 
 setModuleName ($moduleName)
 
 getDisplayName ()
 
 setDisplayName ($displayName)
 
 getSetVariables ()
 
 setSetVariables (array $setVariables)
 
 getGetVariables ()
 
 setGetVariables (array $getVariables)
 
 getPosition ()
 
 getGroup ()
 
 getType ()
 
 isValid ()
 
 __toString ()
 
- Public Member Functions inherited from ButtonInterface
 render ()
 

Protected Member Functions

 preProcess ()
 
 getBackendUser ()
 

Protected Attributes

 $moduleName
 
 $displayName
 
 $setVariables = []
 
 $getVariables = []
 
 $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 38 of file ShortcutButton.php.

Member Function Documentation

__toString ( )

Renders the button

Returns
string

Implements ButtonInterface.

Definition at line 204 of file ShortcutButton.php.

References ButtonInterface\render().

getBackendUser ( )
protected
Returns
BackendUserAuthentication

Definition at line 261 of file ShortcutButton.php.

References $GLOBALS.

getDisplayName ( )

Gets the display name of the module.

Returns
string

Definition at line 92 of file ShortcutButton.php.

References ShortcutButton\$displayName.

getGetVariables ( )

Gets the GET variables.

Returns
array

Definition at line 136 of file ShortcutButton.php.

References ShortcutButton\$getVariables.

getGroup ( )

Gets the button group.

Returns
int

Implements PositionInterface.

Definition at line 168 of file ShortcutButton.php.

getModuleName ( )

Gets the name of the module.

Returns
string

Definition at line 70 of file ShortcutButton.php.

References ShortcutButton\$moduleName.

getPosition ( )

Gets the button position.

Returns
string

Implements PositionInterface.

Definition at line 158 of file ShortcutButton.php.

References ButtonBar\BUTTON_POSITION_RIGHT.

getSetVariables ( )

Gets the SET variables.

Returns
array

Definition at line 114 of file ShortcutButton.php.

References ShortcutButton\$setVariables.

getType ( )

Gets the type of the button

Returns
string

Implements ButtonInterface.

Definition at line 178 of file ShortcutButton.php.

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 ButtonInterface.

Definition at line 190 of file ShortcutButton.php.

References ShortcutButton\preProcess().

preProcess ( )
protected

Pre-processes class member values.

Definition at line 236 of file ShortcutButton.php.

Referenced by ShortcutButton\isValid().

setDisplayName (   $displayName)

Sets the display name of the module.

Parameters
string$displayName
Returns
ShortcutButton

Definition at line 103 of file ShortcutButton.php.

References ShortcutButton\$displayName.

setGetVariables ( array  $getVariables)

Sets the GET variables.

Parameters
array$getVariables
Returns
ShortcutButton

Definition at line 147 of file ShortcutButton.php.

References ShortcutButton\$getVariables.

setModuleName (   $moduleName)

Sets the name of the module.

Parameters
string$moduleName
Returns
ShortcutButton

Definition at line 81 of file ShortcutButton.php.

References ShortcutButton\$moduleName.

setSetVariables ( array  $setVariables)

Sets the SET variables.

Parameters
array$setVariables
Returns
ShortcutButton

Definition at line 125 of file ShortcutButton.php.

References ShortcutButton\$setVariables.

Member Data Documentation

$controllerContext
protected

Definition at line 63 of file ShortcutButton.php.

$displayName
protected
$getVariables = []
protected
$moduleName
protected
$setVariables = []
protected