TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Backend\Rte\AbstractRte Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Rte\AbstractRte:
t3lib_rteapi TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase tx_rtehtmlarea_base TYPO3\CMS\Rtehtmlarea\Controller\FrontendRteController tx_rtehtmlarea_pi2

Public Member Functions

 isAvailable ()
 
 drawRTE (&$pObj, $table, $field, $row, $PA, $specConf, $thisConfig, $RTEtypeVal, $RTErelPath, $thePidValue)
 
 transformContent ($dirRTE, $value, $table, $field, $row, $specConf, $thisConfig, $RTErelPath, $pid)
 
 triggerField ($fieldName)
 

Public Attributes

 $errorLog = array()
 
 $ID = ''
 

Detailed Description

RTE base class: Delivers browser-detection, TCEforms binding and transformation routines for the "rte" extension, registering it with the RTE API See "rte" extension for usage.

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 26 of file AbstractRte.php.

Member Function Documentation

◆ drawRTE()

TYPO3\CMS\Backend\Rte\AbstractRte::drawRTE ( $pObj,
  $table,
  $field,
  $row,
  $PA,
  $specConf,
  $thisConfig,
  $RTEtypeVal,
  $RTErelPath,
  $thePidValue 
)

Draws the RTE as a form field or whatever is needed (inserts JavaApplet, creates iframe, renders ....) Default is to output the transformed content in a plain textarea field. This mode is great for debugging transformations!

Parameters
object$pObjReference to parent object, which is an instance of the TCEforms.
string$tableThe table name
string$fieldThe field name
array$rowThe current row from which field is being rendered
array$PAArray of standard content for rendering form fields from TCEforms. See TCEforms for details on this. Includes for instance the value and the form field name, java script actions and more.
array$specConf"special" configuration - what is found at position 4 in the types configuration of a field from record, parsed into an array.
array$thisConfigConfiguration for RTEs; A mix between TSconfig and otherwise. Contains configuration for display, which buttons are enabled, additional transformation information etc.
string$RTEtypeValRecord "type" field value.
string$RTErelPathRelative path for images/links in RTE; this is used when the RTE edits content from static files where the path of such media has to be transformed forth and back!
integer$thePidValuePID value of record (true parent page id)
Returns
string HTML code for RTE!
Todo:
Define visibility

Definition at line 77 of file AbstractRte.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\formatForTextarea(), TYPO3\CMS\Backend\Rte\AbstractRte\transformContent(), and TYPO3\CMS\Backend\Rte\AbstractRte\triggerField().

Referenced by TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase\isAvailable().

◆ isAvailable()

TYPO3\CMS\Backend\Rte\AbstractRte::isAvailable ( )

Returns TRUE if the RTE is available. Here you check if the browser requirements are met. If there are reasons why the RTE cannot be displayed you simply enter them as text in ->errorLog

Returns
boolean TRUE if this RTE object offers an RTE in the current browser environment
Todo:
Define visibility

Definition at line 56 of file AbstractRte.php.

◆ transformContent()

TYPO3\CMS\Backend\Rte\AbstractRte::transformContent (   $dirRTE,
  $value,
  $table,
  $field,
  $row,
  $specConf,
  $thisConfig,
  $RTErelPath,
  $pid 
)

Performs transformation of content to/from RTE. The keyword $dirRTE determines the direction. This function is called in two situations: a) Right before content from database is sent to the RTE (see ->drawRTE()) it might need transformation b) When content is sent from the RTE and into the database it might need transformation back again (going on in TCEmain class; You can't affect that.)

Parameters
string$dirRTEKeyword: "rte" means direction from db to rte, "db" means direction from Rte to DB
string$valueValue to transform.
string$tableThe table name
string$fieldThe field name
array$rowThe current row from which field is being rendered
array$specConf"special" configuration - what is found at position 4 in the types configuration of a field from record, parsed into an array.
array$thisConfigConfiguration for RTEs; A mix between TSconfig and otherwise. Contains configuration for display, which buttons are enabled, additional transformation information etc.
string$RTErelPathRelative path for images/links in RTE; this is used when the RTE edits content from static files where the path of such media has to be transformed forth and back!
integer$pidPID value of record (true parent page id)
Returns
string Transformed content
Todo:
Define visibility

Definition at line 106 of file AbstractRte.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getSpecConfParametersFromArray(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Backend\Rte\AbstractRte\drawRTE(), TYPO3\CMS\Rtehtmlarea\Controller\FrontendRteController\drawRTE(), and TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase\isAvailable().

◆ triggerField()

TYPO3\CMS\Backend\Rte\AbstractRte::triggerField (   $fieldName)

Trigger field - this field tells the TCEmain that processing should be done on this value!

Parameters
string$fieldNameField name of the RTE field.
Returns
string <input> field of type "hidden" with a flag telling the TCEmain that this fields content should be transformed back to database state.
Todo:
Define visibility

Definition at line 134 of file AbstractRte.php.

Referenced by TYPO3\CMS\Backend\Rte\AbstractRte\drawRTE(), TYPO3\CMS\Rtehtmlarea\Controller\FrontendRteController\drawRTE(), and TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase\isAvailable().

Member Data Documentation

◆ $errorLog

TYPO3\CMS\Backend\Rte\AbstractRte::$errorLog = array()
Todo:
Define visibility

Definition at line 33 of file AbstractRte.php.

◆ $ID

TYPO3\CMS\Backend\Rte\AbstractRte::$ID = ''
Todo:
Define visibility

Definition at line 40 of file AbstractRte.php.