[ Index ]
 

Code source de Typo3 4.1.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/t3lib/ -> class.t3lib_rteapi.php (sommaire)

RTE API parent class.

Author: Kasper Skårhøj <kasperYYYY@typo3.com>
Poids: 208 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

t3lib_rteapi:: (4 méthodes):
  isAvailable()
  drawRTE()
  transformContent()
  triggerField()


Classe: t3lib_rteapi  - X-Ref

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

isAvailable()   X-Ref
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

return: boolean        TRUE if this RTE object offers an RTE in the current browser environment

drawRTE(&$pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue)   X-Ref
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!

param: object        Reference to parent object, which is an instance of the TCEforms.
param: string        The table name
param: string        The field name
param: array        The current row from which field is being rendered
param: array        Array 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.
param: array        "special" configuration - what is found at position 4 in the types configuration of a field from record, parsed into an array.
param: array        Configuration for RTEs; A mix between TSconfig and otherwise. Contains configuration for display, which buttons are enabled, additional transformation information etc.
param: string        Record "type" field value.
param: string        Relative 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!
param: integer        PID value of record (true parent page id)
return: string        HTML code for RTE!

transformContent($dirRTE,$value,$table,$field,$row,$specConf,$thisConfig,$RTErelPath,$pid)   X-Ref
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.)

param: string        Keyword: "rte" means direction from db to rte, "db" means direction from Rte to DB
param: string        Value to transform.
param: string        The table name
param: string        The field name
param: array        The current row from which field is being rendered
param: array        "special" configuration - what is found at position 4 in the types configuration of a field from record, parsed into an array.
param: array        Configuration for RTEs; A mix between TSconfig and otherwise. Contains configuration for display, which buttons are enabled, additional transformation information etc.
param: string        Relative 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!
param: integer        PID value of record (true parent page id)
return: string        Transformed content

triggerField($fieldName)   X-Ref
Trigger field - this field tells the TCEmain that processing should be done on this value!

param: string        Field name of the RTE field.
return: string        <input> field of type "hidden" with a flag telling the TCEmain that this fields content should be traansformed back to database state.



Généré le : Sun Nov 25 17:13:16 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics