TYPO3
7.6
|
Public Member Functions | |
getBodyTag () | |
setBodyTag ($bodyTag) | |
getView () | |
setContent ($content) | |
setTitle ($title) | |
getIconFactory () | |
__construct () | |
addJavaScriptCode ($name= '', $code= '') | |
getDocHeaderComponent () | |
renderContent () | |
getPageRenderer () | |
setForm ($formTag= '') | |
setModuleId ($moduleId) | |
setModuleName ($moduleName) | |
registerModuleMenu ($moduleMenuIdentifier) | |
getDynamicTabMenu (array $menuItems, $domId, $defaultTabIndex=1, $collapsible=false, $wrapContent=true, $storeLastActiveTab=true) | |
loadJavascriptLib ($lib) | |
makeShortcutIcon ($gvList, $setList, $modName, $motherModName= '', $displayName= '', $classes= 'btn btn-default btn-sm') | |
makeShortcutUrl ($gvList, $setList) | |
section ($label, $text, $noStrToUpper=false, $sH=false, $type=0, $allowHtmlInHeader=false) | |
divider ($dist) | |
sectionHeader ($label, $sH=false, $addAttribute= '') | |
sectionBegin () | |
sectionEnd () | |
icons ($type) | |
redirectUrls ($thisLocation= '') | |
header ($text) | |
addFlashMessage ($messageBody, $messageTitle= '', $severity=AbstractMessage::OK, $storeInSession=true) | |
setFlashMessageQueue ($flashMessageQueue) | |
Public Attributes | |
const | STATUS_ICON_ERROR = 3 |
const | STATUS_ICON_WARNING = 2 |
const | STATUS_ICON_NOTIFICATION = 1 |
const | STATUS_ICON_OK = -1 |
Protected Member Functions | |
loadJavaScripts () | |
loadStylesheets () | |
setupPage () | |
setJavaScriptCodeArray () | |
getBackendUserAuthentication () | |
getLanguageService () | |
Protected Attributes | |
$docHeaderComponent | |
$javascriptCodeArray = [] | |
$pageRenderer | |
$templateRootPaths = ['EXT:backend/Resources/Private/Templates'] | |
$partialRootPaths = ['EXT:backend/Resources/Private/Partials'] | |
$layoutRootPaths = ['EXT:backend/Resources/Private/Layouts'] | |
$templateFile = 'Module.html' | |
$view | |
$content = '' | |
$sectionFlag = 0 | |
$iconFactory | |
$moduleId = '' | |
$moduleName = '' | |
$title = '' | |
$bodyTag = '<body>' | |
$flashMessageQueue | |
A class taking care of the "outer" HTML of a module, especially the doc header and other related parts.
Definition at line 38 of file ModuleTemplate.php.
__construct | ( | ) |
Class constructor Sets up view and property objects
InvalidTemplateResourceException | In case a template is invalid |
Definition at line 248 of file ModuleTemplate.php.
References GeneralUtility\makeInstance().
addFlashMessage | ( | $messageBody, | |
$messageTitle = '' , |
|||
$severity = AbstractMessage::OK , |
|||
$storeInSession = true |
|||
) |
Creates a Message object and adds it to the FlashMessageQueue.
string | $messageBody | The message |
string | $messageTitle | Optional message title |
int | $severity | Optional severity, must be one of constants |
bool | $storeInSession | Optional, defines whether the message should be stored in the session (default) |
\InvalidArgumentException | if the message body is no string |
Definition at line 853 of file ModuleTemplate.php.
References GeneralUtility\makeInstance().
addJavaScriptCode | ( | $name = '' , |
|
$code = '' |
|||
) |
Adds JS inline blocks of code to the internal registry
string | $name | Javascript code block name |
string | $code | Inline Javascript |
Definition at line 323 of file ModuleTemplate.php.
divider | ( | $dist | ) |
Inserts a divider image Ends a section (if open) before inserting the image
int | $dist | The margin-top/-bottom of the ruler. |
Definition at line 654 of file ModuleTemplate.php.
References ModuleTemplate\sectionEnd().
|
protected |
Returns the BE USER Object
Definition at line 747 of file ModuleTemplate.php.
References $GLOBALS.
getBodyTag | ( | ) |
Returns the current body tag
Definition at line 186 of file ModuleTemplate.php.
References ModuleTemplate\$bodyTag.
getDocHeaderComponent | ( | ) |
Get the DocHeader
Definition at line 333 of file ModuleTemplate.php.
References ModuleTemplate\$docHeaderComponent.
Referenced by DatabaseRecordList\getDocHeaderButtons(), and ModuleTemplate\registerModuleMenu().
getDynamicTabMenu | ( | array | $menuItems, |
$domId, | |||
$defaultTabIndex = 1 , |
|||
$collapsible = false , |
|||
$wrapContent = true , |
|||
$storeLastActiveTab = true |
|||
) |
Creates a tab menu where the tabs or collapsible are rendered with bootstrap markup
array | $menuItems | Tab elements, each element is an array with "label" and "content" |
string | $domId | DOM id attribute, will be appended with an iteration number per tab. |
int | $defaultTabIndex | Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing will result in no default tab open. |
bool | $collapsible | If set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/fold-in menu. |
bool | $wrapContent | If set, the content is wrapped in div structure which provides a padding and border style. Set this FALSE to get unstyled content pane with fullsize content area. |
bool | $storeLastActiveTab | If set, the last open tab is stored in local storage and will be re-open again. If you don't need this feature, e.g. for wizards like import/export you can disable this behaviour. |
Definition at line 453 of file ModuleTemplate.php.
References ModuleTemplate\$view, GeneralUtility\getFileAbsFileName(), GeneralUtility\makeInstance(), and GeneralUtility\shortMD5().
getIconFactory | ( | ) |
Returns the IconFactory
Definition at line 237 of file ModuleTemplate.php.
References ModuleTemplate\$iconFactory.
|
protected |
Returns the LanguageService
Definition at line 757 of file ModuleTemplate.php.
References $GLOBALS.
Referenced by ModuleTemplate\makeShortcutIcon().
getPageRenderer | ( | ) |
Get PageRenderer
Definition at line 373 of file ModuleTemplate.php.
References ModuleTemplate\$pageRenderer.
getView | ( | ) |
Gets the standalone view.
Definition at line 206 of file ModuleTemplate.php.
References ModuleTemplate\$view.
header | ( | $text | ) |
Returns the header-bar in the top of most backend modules Closes section if open.
string | $text | The text string for the header |
Definition at line 833 of file ModuleTemplate.php.
References ModuleTemplate\sectionEnd().
icons | ( | $type | ) |
Returns an image-tag with an 18x16 icon of the following types:
$type: -1:» OK icon (Check-mark) 1:» Notice (Speach-bubble) 2:» Warning (Yellow triangle) 3:» Fatal error (Red stop sign)
int | $type | See description |
Definition at line 776 of file ModuleTemplate.php.
References Icon\SIZE_SMALL.
Referenced by ModuleTemplate\section().
loadJavascriptLib | ( | $lib | ) |
Includes a javascript library that exists in the core /typo3/ directory
string | $lib | Library name. Call it with the full path like "sysext/core/Resources/Public/JavaScript/QueryGenerator.js" to load it |
Definition at line 491 of file ModuleTemplate.php.
|
protected |
Loads all necessary Javascript Files
Definition at line 265 of file ModuleTemplate.php.
Referenced by ModuleTemplate\renderContent().
|
protected |
Loads all necessary stylesheets
Definition at line 279 of file ModuleTemplate.php.
References $GLOBALS.
Referenced by ModuleTemplate\renderContent().
makeShortcutIcon | ( | $gvList, | |
$setList, | |||
$modName, | |||
$motherModName = '' , |
|||
$displayName = '' , |
|||
$classes = 'btn btn-default btn-sm' |
|||
) |
Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module
string | $gvList | Is the list of GET variables to store (if any) |
string | $setList | Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules |
string | $modName | Module name string |
string | int | $motherModName | Is used to enter the "parent module name" if the module is a submodule under eg. Web>* or File>*. You can also set this value to 1 in which case the currentLoadedModule is sent to the shortcut script (so - not a fixed value!) - that is used in file_edit and wizard_rte modules where those are really running as a part of another module. |
string | $displayName | When given this name is used instead of the module name. |
string | $classes | Additional CSS classes for the link around the icon |
Definition at line 520 of file ModuleTemplate.php.
References $GLOBALS, ModuleTemplate\$moduleName, $url, GeneralUtility\_GET(), elseif, GeneralUtility\getIndpEnv(), ModuleTemplate\getLanguageService(), ModuleTemplate\makeShortcutUrl(), GeneralUtility\quoteJSvalue(), BackendUtility\shortcutExists(), and Icon\SIZE_SMALL.
makeShortcutUrl | ( | $gvList, | |
$setList | |||
) |
MAKE url for storing Internal func
string | $gvList | Is the list of GET variables to store (if any) |
string | $setList | Is the list of SET[] variables to store (if any)
|
Definition at line 574 of file ModuleTemplate.php.
References $GLOBALS, GeneralUtility\_GET(), GeneralUtility\compileSelectedGetVarsFromArray(), and GeneralUtility\implodeArrayForUrl().
Referenced by ModuleTemplate\makeShortcutIcon().
redirectUrls | ( | $thisLocation = '' | ) |
Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page. Used in fx. db_list.php (Web>List)
string | $thisLocation | URL to "this location" / current script |
Definition at line 810 of file ModuleTemplate.php.
References GeneralUtility\_GP(), GeneralUtility\linkThisScript(), GeneralUtility\quoteJSvalue(), and GeneralUtility\sanitizeLocalUrl().
registerModuleMenu | ( | $moduleMenuIdentifier | ) |
Generates the Menu for things like Web->Info
$moduleMenuIdentifier |
Definition at line 420 of file ModuleTemplate.php.
References $GLOBALS, and ModuleTemplate\getDocHeaderComponent().
Referenced by ModuleTemplate\setModuleId().
renderContent | ( | ) |
Returns the fully rendered view
Definition at line 343 of file ModuleTemplate.php.
References ModuleTemplate\$bodyTag, BackendUtility\getUpdateSignalCode(), ModuleTemplate\loadJavaScripts(), ModuleTemplate\loadStylesheets(), PageRenderer\PART_FOOTER, PageRenderer\PART_HEADER, ModuleTemplate\setJavaScriptCodeArray(), and ModuleTemplate\setupPage().
section | ( | $label, | |
$text, | |||
$noStrToUpper = false , |
|||
$sH = false , |
|||
$type = 0 , |
|||
$allowHtmlInHeader = false |
|||
) |
Begins an output section and sets header and content
string | $label | The header |
string | $text | The HTML-content |
bool | $noStrToUpper | A flag that will prevent the header from being converted to uppercase |
bool | $sH | Defines the type of header (if set, "<h3>" rather than the default "h4") |
int | $type | The number of an icon to show with the header (see the icon-function). -1,1,2,3 |
bool | $allowHtmlInHeader | If set, HTML tags are allowed in $label (otherwise this value is by default htmlspecialchars()'ed) |
Definition at line 627 of file ModuleTemplate.php.
References ModuleTemplate\icons(), ModuleTemplate\sectionBegin(), and ModuleTemplate\sectionHeader().
sectionBegin | ( | ) |
Begins an output section. Returns the
Definition at line 701 of file ModuleTemplate.php.
Referenced by ModuleTemplate\section(), and ModuleTemplate\sectionHeader().
sectionEnd | ( | ) |
Ends and output section Returns the -end tag AND clears the ->sectionFlag (but does so only IF the sectionFlag is set - that is a section is 'open') See sectionBegin() also.
Definition at line 726 of file ModuleTemplate.php.
Referenced by ModuleTemplate\divider(), and ModuleTemplate\header().
sectionHeader | ( | $label, | |
$sH = false , |
|||
$addAttribute = '' |
|||
) |
Make a section header. Begins a section if not already open.
string | $label | The label between the or tags. (Allows HTML) bool $sH If set, is used, otherwise string $addAttribute Additional attributes to h-tag, eg. ' class=""' string HTML content |
Definition at line 676 of file ModuleTemplate.php.
References ModuleTemplate\sectionBegin().
Referenced by ModuleTemplate\section().
setBodyTag | ( | $bodyTag | ) |
Sets the body tag
string | $bodyTag |
Definition at line 196 of file ModuleTemplate.php.
References ModuleTemplate\$bodyTag.
setContent | ( | $content | ) |
Set content
string | $content | Content of the module |
Definition at line 217 of file ModuleTemplate.php.
References ModuleTemplate\$content.
setFlashMessageQueue | ( | $flashMessageQueue | ) |
\TYPO3\CMS\Core\Messaging\FlashMessageQueue | $flashMessageQueue |
Definition at line 872 of file ModuleTemplate.php.
References ModuleTemplate\$flashMessageQueue.
setForm | ( | $formTag = '' | ) |
Set form tag
string | $formTag | Form tag to add |
Definition at line 385 of file ModuleTemplate.php.
|
protected |
Wrapper function for adding JS inline blocks
Definition at line 308 of file ModuleTemplate.php.
Referenced by ModuleTemplate\renderContent().
setModuleId | ( | $moduleId | ) |
Sets the ModuleId
string | $moduleId | ID of the module |
Definition at line 397 of file ModuleTemplate.php.
References ModuleTemplate\$moduleId, and ModuleTemplate\registerModuleMenu().
setModuleName | ( | $moduleName | ) |
Sets the ModuleName
string | $moduleName | Name of the module |
Definition at line 410 of file ModuleTemplate.php.
References ModuleTemplate\$moduleName.
setTitle | ( | $title | ) |
Set title tag
string | $title |
Definition at line 227 of file ModuleTemplate.php.
References ModuleTemplate\$title.
|
protected |
Sets mandatory parameters for the view (pageRenderer)
Definition at line 294 of file ModuleTemplate.php.
Referenced by ModuleTemplate\renderContent().
|
protected |
Definition at line 172 of file ModuleTemplate.php.
Referenced by ModuleTemplate\getBodyTag(), ModuleTemplate\renderContent(), and ModuleTemplate\setBodyTag().
|
protected |
Definition at line 130 of file ModuleTemplate.php.
Referenced by ModuleTemplate\setContent().
|
protected |
Definition at line 73 of file ModuleTemplate.php.
Referenced by ModuleTemplate\getDocHeaderComponent().
|
protected |
Definition at line 179 of file ModuleTemplate.php.
Referenced by ModuleTemplate\setFlashMessageQueue().
|
protected |
Definition at line 144 of file ModuleTemplate.php.
Referenced by ModuleTemplate\getIconFactory().
|
protected |
Definition at line 81 of file ModuleTemplate.php.
|
protected |
Definition at line 109 of file ModuleTemplate.php.
|
protected |
Definition at line 151 of file ModuleTemplate.php.
Referenced by ModuleTemplate\setModuleId().
|
protected |
Definition at line 158 of file ModuleTemplate.php.
Referenced by ModuleTemplate\makeShortcutIcon(), and ModuleTemplate\setModuleName().
|
protected |
Definition at line 88 of file ModuleTemplate.php.
Referenced by ModuleTemplate\getPageRenderer().
|
protected |
Definition at line 102 of file ModuleTemplate.php.
|
protected |
Definition at line 137 of file ModuleTemplate.php.
|
protected |
Definition at line 116 of file ModuleTemplate.php.
|
protected |
Definition at line 95 of file ModuleTemplate.php.
|
protected |
Definition at line 165 of file ModuleTemplate.php.
Referenced by ModuleTemplate\setTitle().
|
protected |
Definition at line 123 of file ModuleTemplate.php.
Referenced by ModuleTemplate\getDynamicTabMenu(), and ModuleTemplate\getView().
const STATUS_ICON_ERROR = 3 |
Error Icon Constant
Definition at line 45 of file ModuleTemplate.php.
const STATUS_ICON_NOTIFICATION = 1 |
Notification Icon Constant
Definition at line 59 of file ModuleTemplate.php.
const STATUS_ICON_OK = -1 |
OK Icon Constant
Definition at line 66 of file ModuleTemplate.php.
const STATUS_ICON_WARNING = 2 |
Warning Icon Constant
Definition at line 52 of file ModuleTemplate.php.