TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AdminPanelView Class Reference

Public Member Functions

 __construct ()
 
 initialize ()
 
 getAdminPanelHeaderData ()
 
 isAdminModuleEnabled ($key)
 
 saveConfigOptions ()
 
 extGetFeAdminValue ($sectionName, $val= '')
 
 forcePreview ()
 
 isAdminModuleOpen ($key)
 
 display ()
 
 extGetHead ($sectionSuffix)
 
 linkSectionHeader ($sectionSuffix, $sectionTitle, $className= '')
 
 extGetItem ($title, $content= '', $checkbox= '', $outerDivClass=null, $innerDivClass=null)
 
 ext_makeToolBar ()
 

Protected Member Functions

 getHiddenFields ($key, array $val)
 
 getPreviewModule ()
 
 getCacheModule ()
 
 getEditModule ()
 
 getTSDebugModule ()
 
 getInfoModule ()
 
 extGetLL ($key, $convertWithHtmlspecialchars=true)
 
 getLanguageService ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getTypoScriptFrontendController ()
 
 getTimeTracker ()
 

Protected Attributes

 $extNeedUpdate = false
 
 $ext_forcePreview = false
 
 $extJSCODE = ''
 
 $iconFactory
 

Detailed Description

View class for the admin panel in frontend editing.

Definition at line 26 of file AdminPanelView.php.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 55 of file AdminPanelView.php.

References AdminPanelView\initialize().

Member Function Documentation

display ( )
ext_makeToolBar ( )

Creates the tool bar links for the "edit" section of the Admin Panel.

Returns
string A string containing images wrapped in -tags linking them to proper functions.

Definition at line 632 of file AdminPanelView.php.

Referenced by AdminPanelView\getEditModule().

extGetFeAdminValue (   $sectionName,
  $val = '' 
)

Returns the value for an Admin Panel setting.

Parameters
string$sectionNameModule key
string$valSetting key
Returns
mixed The setting value

Definition at line 174 of file AdminPanelView.php.

References AdminPanelView\getBackendUser(), AdminPanelView\isAdminModuleEnabled(), and AdminPanelView\isAdminModuleOpen().

Referenced by AdminPanelView\getCacheModule(), AdminPanelView\initialize(), and AdminPanelView\saveConfigOptions().

extGetHead (   $sectionSuffix)

Returns a row (with colspan=4) which is a header for a section in the Admin Panel. It will have a plus/minus icon and a label which is linked so that it submits the form which surrounds the whole Admin Panel when clicked, alterting the TSFE_ADMIN_PANEL[display_' . $pre . '] value See the functions get*Module

Parameters
string$sectionSuffixThe suffix to the display_ label. Also selects the label from the LOCAL_LANG array.
Returns
string HTML table row.
See Also
extGetItem()

Definition at line 577 of file AdminPanelView.php.

Referenced by AdminPanelView\getCacheModule(), AdminPanelView\getEditModule(), and AdminPanelView\getPreviewModule().

extGetItem (   $title,
  $content = '',
  $checkbox = '',
  $outerDivClass = null,
  $innerDivClass = null 
)

Returns a row (with 4 columns) for content in a section of the Admin Panel. It will take $pre as a key to a label to display and $element as the content to put into the forth cell.

Parameters
string$titleKey to label
string$contentThe HTML content for the forth table cell.
string$checkboxThe HTML for a checkbox or hidden fields.
string$innerDivClassThe Class attribute for the td element.
string$outerDivClassThe Class attribute for the tr element.
Returns
string HTML table row.
See Also
extGetHead()

Definition at line 617 of file AdminPanelView.php.

Referenced by AdminPanelView\getCacheModule(), AdminPanelView\getEditModule(), and AdminPanelView\getPreviewModule().

extGetLL (   $key,
  $convertWithHtmlspecialchars = true 
)
protected

Translate given key

Parameters
string$keyKey for a label in the $LOCAL_LANG array of "sysext/lang/locallang_tsfe.xlf
bool$convertWithHtmlspecialcharsIf TRUE the language-label will be sent through htmlspecialchars
Returns
string The value for the $key

Definition at line 715 of file AdminPanelView.php.

Referenced by AdminPanelView\display(), and AdminPanelView\getCacheModule().

forcePreview ( )

Enables the force preview option.

Returns
void

Definition at line 217 of file AdminPanelView.php.

getAdminPanelHeaderData ( )

Add an additional stylesheet

Returns
string

Definition at line 108 of file AdminPanelView.php.

References $GLOBALS, and GeneralUtility\locationHeaderUrl().

getBackendUser ( )
protected
getCacheModule ( )
protected

Creates the content for the "cache" section ("module") of the Admin Panel

Returns
string HTML content for the section. Consists of a string with table-rows with four columns.
See Also
display()

Definition at line 407 of file AdminPanelView.php.

References $GLOBALS, AdminPanelView\extGetFeAdminValue(), AdminPanelView\extGetHead(), AdminPanelView\extGetItem(), AdminPanelView\extGetLL(), AdminPanelView\getBackendUser(), AdminPanelView\getTypoScriptFrontendController(), and Icon\SIZE_SMALL.

Referenced by AdminPanelView\display().

getDatabaseConnection ( )
protected

Returns the database connection

Returns

Definition at line 749 of file AdminPanelView.php.

Referenced by AdminPanelView\getPreviewModule(), and AdminPanelView\initialize().

getEditModule ( )
protected

Creates the content for the "edit" section ("module") of the Admin Panel

Returns
string HTML content for the section. Consists of a string with table-rows with four columns.
See Also
display()

Definition at line 444 of file AdminPanelView.php.

References $GLOBALS, GeneralUtility\_GP(), AdminPanelView\ext_makeToolBar(), AdminPanelView\extGetHead(), AdminPanelView\extGetItem(), BackendUtility\getBackendScript(), AdminPanelView\getBackendUser(), AdminPanelView\getTypoScriptFrontendController(), BackendUtility\isModuleSetInTBE_MODULES(), and GeneralUtility\quoteJSvalue().

Referenced by AdminPanelView\display().

getHiddenFields (   $key,
array  $val 
)
protected

Fetches recursively all GET parameters as hidden fields. Called from display()

Parameters
string$keyCurrent key
array$valCurrent value
Returns
string Hidden fields
See Also
display()

Definition at line 346 of file AdminPanelView.php.

Referenced by AdminPanelView\display().

getInfoModule ( )
protected

Creates the content for the "info" section ("module") of the Admin Panel

Returns
string HTML content for the section. Consists of a string with table-rows with four columns.
See Also
display()

Definition at line 511 of file AdminPanelView.php.

Referenced by AdminPanelView\display().

getLanguageService ( )
protected

Returns LanguageService

Returns

Definition at line 729 of file AdminPanelView.php.

Referenced by AdminPanelView\display().

getPreviewModule ( )
protected

Creates the content for the "preview" section ("module") of the Admin Panel

Returns
string HTML content for the section. Consists of a string with table-rows with four columns.
See Also
display()

Definition at line 368 of file AdminPanelView.php.

References BackendUtility\deleteClause(), AdminPanelView\extGetHead(), AdminPanelView\extGetItem(), AdminPanelView\getBackendUser(), and AdminPanelView\getDatabaseConnection().

Referenced by AdminPanelView\display().

getTimeTracker ( )
protected
Returns

Definition at line 765 of file AdminPanelView.php.

Referenced by AdminPanelView\saveConfigOptions().

getTSDebugModule ( )
protected

Creates the content for the "tsdebug" section ("module") of the Admin Panel

Returns
string HTML content for the section. Consists of a string with table-rows with four columns.
See Also
display()

Definition at line 481 of file AdminPanelView.php.

Referenced by AdminPanelView\display().

getTypoScriptFrontendController ( )
protected
initialize ( )
isAdminModuleEnabled (   $key)

Checks if an Admin Panel section ("module") is available for the user. If so, TRUE is returned.

Parameters
string$keyThe module key, eg. "edit", "preview", "info" etc.
Returns
bool

Definition at line 124 of file AdminPanelView.php.

References elseif, and AdminPanelView\getBackendUser().

Referenced by AdminPanelView\display(), AdminPanelView\extGetFeAdminValue(), and AdminPanelView\saveConfigOptions().

isAdminModuleOpen (   $key)

Returns TRUE if admin panel module is open

Parameters
string$keyModule key
Returns
bool TRUE, if the admin panel is open for the specified admin panel module key.

Definition at line 228 of file AdminPanelView.php.

References AdminPanelView\getBackendUser().

Referenced by AdminPanelView\extGetFeAdminValue().

linkSectionHeader (   $sectionSuffix,
  $sectionTitle,
  $className = '' 
)

Wraps a string in a link which will open/close a certain part of the Admin Panel

Parameters
string$sectionSuffixThe code for the display_ label/key
string$sectionTitleTitle (in HTML-format)
string$classNameThe classname for the tag
Returns
string $className Linked input string
See Also
extGetHead()

Definition at line 594 of file AdminPanelView.php.

Referenced by AdminPanelView\display().

saveConfigOptions ( )

Saves any change in settings made in the Admin Panel. Called from index_ts.php right after access check for the Admin Panel

Returns
void

Definition at line 144 of file AdminPanelView.php.

References GeneralUtility\_GP(), AdminPanelView\extGetFeAdminValue(), AdminPanelView\getBackendUser(), AdminPanelView\getTimeTracker(), AdminPanelView\getTypoScriptFrontendController(), and AdminPanelView\isAdminModuleEnabled().

Referenced by AdminPanelView\initialize().

Member Data Documentation

$ext_forcePreview = false
protected

Definition at line 40 of file AdminPanelView.php.

$extJSCODE = ''
protected

Definition at line 45 of file AdminPanelView.php.

$extNeedUpdate = false
protected

Definition at line 33 of file AdminPanelView.php.

$iconFactory
protected

Definition at line 50 of file AdminPanelView.php.