TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\T3editor\Form\Element\T3editorElement Class Reference
Inheritance diagram for TYPO3\CMS\T3editor\Form\Element\T3editorElement:
TYPO3\CMS\Backend\Form\Element\AbstractFormElement TYPO3\CMS\Backend\Form\AbstractNode TYPO3\CMS\Backend\Form\NodeInterface

Public Member Functions

 render ()
 
 setMode ($mode)
 
 getMode ()
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Form\AbstractNode
 __construct (NodeFactory $nodeFactory, array $data)
 
 render ()
 

Public Attributes

const MODE_CSS = 'css'
 
const MODE_HTML = 'html'
 
const MODE_JAVASCRIPT = 'javascript'
 
const MODE_MIXED = 'mixed'
 
const MODE_PHP = 'php'
 
const MODE_SPARQL = 'sparql'
 
const MODE_TYPOSCRIPT = 'typoscript'
 
const MODE_XML = 'xml'
 

Protected Member Functions

 initJavascriptCode ()
 
 getHTMLCodeForEditor ($name, $class='', $content='', $additionalParams='', $alt='', array $hiddenfields=[])
 
 getParserfileByMode ($mode)
 
 getStylesheetByMode ($mode)
 
 getLanguageService ()
 
 getBackendUserAuthentication ()
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 isWizardsDisabled ()
 
 formMaxWidth ($size=48)
 
 getClipboardElements ($allowed, $mode)
 
 getLanguageService ()
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Form\AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

 $allowedModes
 
 $resultArray
 
 $mode = ''
 
 $editorCounter = 0
 
 $relExtPath = ''
 
 $codemirrorPath = 'Resources/Public/JavaScript/Contrib/codemirror/js/'
 
 $codeCompletionComponents = ['TsRef', 'CompletionResult', 'TsParser', 'TsCodeCompletion']
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 $defaultInputWidth = 30
 
 $minimumInputWidth = 10
 
 $maxInputWidth = 50
 
 $clipboard = null
 
 $iconFactory
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Form\AbstractNode
 $data = []
 

Detailed Description

t3editor FormEngine widget

Definition at line 28 of file T3editorElement.php.

Member Function Documentation

◆ getBackendUserAuthentication()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 306 of file T3editorElement.php.

References $GLOBALS.

◆ getHTMLCodeForEditor()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getHTMLCodeForEditor (   $name,
  $class = '',
  $content = '',
  $additionalParams = '',
  $alt = '',
array  $hiddenfields = [] 
)
protected

◆ getLanguageService()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getLanguageService ( )
protected

◆ getMode()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getMode ( )

Get mode

Returns
string

Definition at line 151 of file T3editorElement.php.

References TYPO3\CMS\T3editor\Form\Element\T3editorElement\$mode.

◆ getParserfileByMode()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getParserfileByMode (   $mode)
protected

Determine the correct parser js file for given mode

Parameters
string$mode
Returns
string Parser file name

Definition at line 224 of file T3editorElement.php.

References TYPO3\CMS\T3editor\Form\Element\T3editorElement\$mode.

Referenced by TYPO3\CMS\T3editor\Form\Element\T3editorElement\getHTMLCodeForEditor().

◆ getStylesheetByMode()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::getStylesheetByMode (   $mode)
protected

Determine the correct css file for given mode

Parameters
string$mode
Returns
string css file name

Definition at line 261 of file T3editorElement.php.

References TYPO3\CMS\T3editor\Form\Element\T3editorElement\$mode.

Referenced by TYPO3\CMS\T3editor\Form\Element\T3editorElement\getHTMLCodeForEditor().

◆ initJavascriptCode()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::initJavascriptCode ( )
protected

Init the JavaScript code (header part) for editor

Definition at line 159 of file T3editorElement.php.

Referenced by TYPO3\CMS\T3editor\Form\Element\T3editorElement\render().

◆ render()

◆ setMode()

TYPO3\CMS\T3editor\Form\Element\T3editorElement::setMode (   $mode)

Sets the type of code to edit, use one of the predefined constants

Parameters
string$modeExpects one of the predefined constants
Exceptions

Definition at line 138 of file T3editorElement.php.

References TYPO3\CMS\T3editor\Form\Element\T3editorElement\$mode.

Referenced by TYPO3\CMS\T3editor\Form\Element\T3editorElement\render().

Member Data Documentation

◆ $allowedModes

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$allowedModes
protected
Initial value:
= [
self::MODE_CSS,
self::MODE_HTML,
self::MODE_JAVASCRIPT,
self::MODE_MIXED,
self::MODE_PHP,
self::MODE_SPARQL,
self::MODE_TYPOSCRIPT,
self::MODE_XML,
]

Definition at line 42 of file T3editorElement.php.

◆ $codeCompletionComponents

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$codeCompletionComponents = ['TsRef', 'CompletionResult', 'TsParser', 'TsCodeCompletion']
protected

Definition at line 87 of file T3editorElement.php.

◆ $codemirrorPath

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$codemirrorPath = 'Resources/Public/JavaScript/Contrib/codemirror/js/'
protected

◆ $editorCounter

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$editorCounter = 0
protected

◆ $mode

◆ $relExtPath

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$relExtPath = ''
protected

◆ $resultArray

TYPO3\CMS\T3editor\Form\Element\T3editorElement::$resultArray
protected

◆ MODE_CSS

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_CSS = 'css'

Definition at line 30 of file T3editorElement.php.

◆ MODE_HTML

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_HTML = 'html'

Definition at line 31 of file T3editorElement.php.

◆ MODE_JAVASCRIPT

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_JAVASCRIPT = 'javascript'

Definition at line 32 of file T3editorElement.php.

◆ MODE_MIXED

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_MIXED = 'mixed'

Definition at line 33 of file T3editorElement.php.

◆ MODE_PHP

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_PHP = 'php'

Definition at line 34 of file T3editorElement.php.

◆ MODE_SPARQL

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_SPARQL = 'sparql'

Definition at line 35 of file T3editorElement.php.

◆ MODE_TYPOSCRIPT

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_TYPOSCRIPT = 'typoscript'

Definition at line 36 of file T3editorElement.php.

◆ MODE_XML

const TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_XML = 'xml'

Definition at line 37 of file T3editorElement.php.