TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
RteHtmlAreaApi Class Reference
Inheritance diagram for RteHtmlAreaApi:
Abbreviation AboutEditor BlockElements BlockStyle CharacterMap ContextMenu CopyPaste DefaultClean DefaultImage DefaultInline DefaultLink DefinitionList EditElement EditorMode FindReplace InlineElements InsertSmiley Language MicroDataSchema Plaintext QuickTag RemoveFormat SelectFont Spellchecker TableOperations TextIndicator TextStyle Typo3Color Typo3HtmlParser Typo3Image Typo3Link UndoRedo UserElements

Public Member Functions

 main (array $configuration)
 
 buildJavascriptConfiguration ()
 
 getExtensionKey ()
 
 addsButtons ()
 
 getPluginButtons ()
 
 getPluginLabels ()
 
 getConvertToolbarForHtmlAreaArray ()
 
 requiresClassesConfiguration ()
 
 getRequiredPlugins ()
 
 setToolbar (array $toolbar)
 

Protected Member Functions

 cleanList ($str)
 
 getPageConfigLabel ($string)
 
 isFrontend ()
 
 isFrontendEditActive ()
 
 writeTemporaryFile ($label, $fileExtension= 'js', $contents= '')
 
 getLanguageService ()
 

Protected Attributes

 $extensionKey = 'rtehtmlarea'
 
 $pluginName
 
 $relativePathToSkin = ''
 
 $toolbar
 
 $pluginButtons = ''
 
 $pluginLabels = ''
 
 $pluginAddsButtons = true
 
 $convertToolbarForHtmlAreaArray = []
 
 $requiresClassesConfiguration = false
 
 $requiredPlugins = ''
 
 $configuration
 

Detailed Description

API for extending htmlArea RTE

Definition at line 25 of file RteHtmlAreaApi.php.

Member Function Documentation

addsButtons ( )

Returns a boolean indicating whether the plugin adds buttons or not to the toolbar

Returns
bool

Definition at line 156 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$pluginAddsButtons.

buildJavascriptConfiguration ( )

Return JS configuration of the htmlArea plugins registered by the extension

Returns
string JS configuration for registered plugins

Definition at line 127 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$pluginButtons, and GeneralUtility\trimExplode().

cleanList (   $str)
protected
getConvertToolbarForHtmlAreaArray ( )

Returns the conversion array from TYPO3 button names to htmlArea button names

Returns
array the conversion array from TYPO3 button names to htmlArea button names

Definition at line 186 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$convertToolbarForHtmlAreaArray.

getExtensionKey ( )

Returns the extension key

Returns
string the extension key

Definition at line 146 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$extensionKey.

getPageConfigLabel (   $string)
protected

Resolve a label and do some funny quoting.

Parameters
string$stringGiven label name
Returns
string Resolved label

Definition at line 243 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\getLanguageService().

Referenced by BlockElements\buildJavascriptConfiguration(), and SelectFont\buildJSFontItemsConfig().

getPluginButtons ( )

Returns the list of buttons implemented by the plugin

Returns
string the list of buttons implemented by the plugin

Definition at line 166 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$pluginButtons.

getPluginLabels ( )

Returns the list of toolbar labels implemented by the plugin

Returns
string the list of labels implemented by the plugin

Definition at line 176 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$pluginLabels.

getRequiredPlugins ( )

Returns the list of plugins required by the plugin

Returns
string the list of plugins required by the plugin

Definition at line 206 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$requiredPlugins.

isFrontend ( )
protected

Return TRUE if we are in the FE, but not in the FE editing feature of BE.

Returns
bool

Definition at line 256 of file RteHtmlAreaApi.php.

References $GLOBALS, and RteHtmlAreaApi\isFrontendEditActive().

Referenced by RteHtmlAreaApi\main().

isFrontendEditActive ( )
protected

Checks whether frontend editing is active.

Returns
bool

Definition at line 268 of file RteHtmlAreaApi.php.

References $GLOBALS.

Referenced by RteHtmlAreaApi\isFrontend().

main ( array  $configuration)

Returns TRUE if the plugin is available and correctly initialized

Parameters
array$configurationConfiguration array given from calling object down to the single plugins
Returns
bool TRUE if this plugin object should be made available in the current environment and is correctly initialized

Definition at line 110 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$configuration, $GLOBALS, and RteHtmlAreaApi\isFrontend().

requiresClassesConfiguration ( )

Returns TRUE if the extension requires the PageTSConfig Classes configuration

Returns
bool TRUE if the extension requires the PageTSConfig Classes configuration

Definition at line 196 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$requiresClassesConfiguration.

setToolbar ( array  $toolbar)

Set toolbal

Parameters
array$toolbar

Definition at line 216 of file RteHtmlAreaApi.php.

References RteHtmlAreaApi\$toolbar.

writeTemporaryFile (   $label,
  $fileExtension = 'js',
  $contents = '' 
)
protected

Writes contents in a file in typo3temp and returns the file name

Parameters
string$label,A label to insert at the beginning of the name of the file
string$fileExtension,The file extension of the file, defaulting to 'js'
string$contents,The contents to write into the file
Returns
string The name of the file written to typo3temp
Exceptions
RuntimeException If writing to file failed

Definition at line 284 of file RteHtmlAreaApi.php.

References PathUtility\getAbsoluteWebPath(), GeneralUtility\minifyJavaScript(), GeneralUtility\shortMD5(), and GeneralUtility\writeFileToTypo3tempDir().

Referenced by MicroDataSchema\buildJavascriptConfiguration(), Typo3Link\buildJavascriptConfiguration(), Language\buildJavascriptConfiguration(), Abbreviation\buildJavascriptConfiguration(), and SelectFont\buildJSFontItemsConfig().

Member Data Documentation

$configuration
protected

Definition at line 102 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\main().

$convertToolbarForHtmlAreaArray = []
protected

Definition at line 81 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\getConvertToolbarForHtmlAreaArray().

$extensionKey = 'rtehtmlarea'
protected
$pluginAddsButtons = true
protected

Definition at line 74 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\addsButtons().

$pluginButtons = ''
protected
$pluginLabels = ''
protected

Definition at line 67 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\getPluginLabels().

$pluginName
protected

Definition at line 39 of file RteHtmlAreaApi.php.

$relativePathToSkin = ''
protected

Definition at line 46 of file RteHtmlAreaApi.php.

$requiredPlugins = ''
protected

Definition at line 95 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\getRequiredPlugins().

$requiresClassesConfiguration = false
protected

Definition at line 88 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\requiresClassesConfiguration().

$toolbar
protected

Definition at line 53 of file RteHtmlAreaApi.php.

Referenced by RteHtmlAreaApi\setToolbar().