TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
T3editorElement Class Reference
Inheritance diagram for T3editorElement:
AbstractFormElement AbstractNode NodeInterface

Public Member Functions

 render ()
 
 setMode ($mode)
 
 getMode ()
 
- Public Member Functions inherited from AbstractFormElement
 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from 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=array())
 
 getParserfileByMode ($mode)
 
 getStylesheetByMode ($mode)
 
 getLanguageService ()
 
 getBackendUserAuthentication ()
 
- Protected Member Functions inherited from AbstractFormElement
 isWizardsDisabled ()
 
 formMaxWidth ($size=48)
 
 getClipboardElements ($allowed, $mode)
 
 getLanguageService ()
 
- Protected Member Functions inherited from AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

 $allowedModes
 
 $resultArray
 
 $mode = ''
 
 $editorCounter = 0
 
 $relExtPath = ''
 
 $codemirrorPath = 'sysext/t3editor/Resources/Public/JavaScript/Contrib/codemirror/js/'
 
 $codeCompletionComponents = array('TsRef', 'CompletionResult', 'TsParser', 'TsCodeCompletion')
 
- Protected Attributes inherited from AbstractFormElement
 $defaultInputWidth = 30
 
 $minimumInputWidth = 10
 
 $maxInputWidth = 50
 
 $clipboard = null
 
 $iconFactory
 
- Protected Attributes inherited from AbstractNode
 $data = array()
 

Detailed Description

t3editor FormEngine widget

Definition at line 28 of file T3editorElement.php.

Member Function Documentation

getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 305 of file T3editorElement.php.

References $GLOBALS.

getHTMLCodeForEditor (   $name,
  $class = '',
  $content = '',
  $additionalParams = '',
  $alt = '',
array  $hiddenfields = array() 
)
protected

Generates HTML with code editor

Parameters
string$nameName attribute of HTML tag
string$classClass attribute of HTML tag
string$contentContent of the editor
string$additionalParamsAny additional editor parameters
string$altAlt attribute
array$hiddenfields
Returns
string Generated HTML code for editor

Definition at line 179 of file T3editorElement.php.

References T3editorElement\$codemirrorPath, T3editorElement\$editorCounter, T3editorElement\$relExtPath, GeneralUtility\getFileAbsFileName(), T3editorElement\getLanguageService(), T3editorElement\getParserfileByMode(), T3editorElement\getStylesheetByMode(), and GeneralUtility\getUrl().

Referenced by T3editorElement\render().

getLanguageService ( )
protected
Returns
LanguageService

Definition at line 297 of file T3editorElement.php.

References $GLOBALS.

Referenced by T3editorElement\getHTMLCodeForEditor(), and T3editorElement\render().

getMode ( )

Get mode

Returns
string

Definition at line 149 of file T3editorElement.php.

References T3editorElement\$mode.

getParserfileByMode (   $mode)
protected

Determine the correct parser js file for given mode

Parameters
string$mode
Returns
string Parser file name

Definition at line 223 of file T3editorElement.php.

References T3editorElement\$mode.

Referenced by T3editorElement\getHTMLCodeForEditor().

getStylesheetByMode (   $mode)
protected

Determine the correct css file for given mode

Parameters
string$mode
Returns
string css file name

Definition at line 260 of file T3editorElement.php.

References T3editorElement\$mode.

Referenced by T3editorElement\getHTMLCodeForEditor().

initJavascriptCode ( )
protected

Init the JavaScript code (header part) for editor

Definition at line 157 of file T3editorElement.php.

Referenced by T3editorElement\render().

render ( )
setMode (   $mode)

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

Parameters
string$modeExpects one of the predefined constants
Exceptions
\InvalidArgumentException

Definition at line 136 of file T3editorElement.php.

References T3editorElement\$mode.

Referenced by T3editorElement\render().

Member Data Documentation

$allowedModes
protected
Initial value:
= array(
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 = array('TsRef', 'CompletionResult', 'TsParser', 'TsCodeCompletion')
protected

Definition at line 87 of file T3editorElement.php.

$codemirrorPath = 'sysext/t3editor/Resources/Public/JavaScript/Contrib/codemirror/js/'
protected

Definition at line 80 of file T3editorElement.php.

Referenced by T3editorElement\getHTMLCodeForEditor().

$editorCounter = 0
protected

Definition at line 68 of file T3editorElement.php.

Referenced by T3editorElement\getHTMLCodeForEditor().

$mode = ''
protected
$relExtPath = ''
protected

Definition at line 75 of file T3editorElement.php.

Referenced by T3editorElement\getHTMLCodeForEditor().

$resultArray
protected

Definition at line 56 of file T3editorElement.php.

Referenced by T3editorElement\render().

const MODE_CSS = 'css'

Definition at line 30 of file T3editorElement.php.

const MODE_HTML = 'html'

Definition at line 31 of file T3editorElement.php.

const MODE_JAVASCRIPT = 'javascript'

Definition at line 32 of file T3editorElement.php.

const MODE_MIXED = 'mixed'

Definition at line 33 of file T3editorElement.php.

const MODE_PHP = 'php'

Definition at line 34 of file T3editorElement.php.

const MODE_SPARQL = 'sparql'

Definition at line 35 of file T3editorElement.php.

const MODE_TYPOSCRIPT = 'typoscript'

Definition at line 36 of file T3editorElement.php.

const MODE_XML = 'xml'

Definition at line 37 of file T3editorElement.php.