Solutions Open Source

Référence de la classe user_plaintext

Liste de tous les membres

Fonctions membres publiques

 main_plaintext ($content, $conf)
 getMenuSitemap ()
 getShortcut ()
 getHTML ($str=array())
 getHeader ()
 getImages ()
 parseBody ($str)
 renderUploads ($str, $upload_path='uploads/media/')
 renderHeader ($str, $type=0)
 pad ($lines, $preLineChar, $len)
 breakContent ($str)
 breakBulletlist ($str)
 breakTable ($str)
 addDiv ($messure, $content, $divChar, $joinChar, $cols)
 traverseTable ($tableLines)
 renderImages ($str, $links, $caption, $upload_path='uploads/pics/')
 getLink ($ll)
 breakLines ($str, $implChar="\n", $charWidth=0)
 getString ($str)
 userProcess ($mConfKey, $passVar)
 atag_to_http ($content, $conf)
 typolist ($content, $conf)
 typohead ($content, $conf)
 typocode ($content, $conf)

Attributs publics

 $cObj
 $conf = array()
 $charWidth = 76


Documentation des fonctions membres

user_plaintext::main_plaintext ( content,
conf 
)

Main function, called from TypoScript A content object that renders "tt_content" records. See the comment to this class for TypoScript example of how to trigger it. This detects the CType of the current content element and renders it accordingly. Only wellknown types are rendered.

Paramètres:
string Empty, ignore.
array TypoScript properties for this content object/function call
Renvoie:
string Plain text content

user_plaintext::getMenuSitemap (  ) 

Creates a menu/sitemap

Renvoie:
string Content

user_plaintext::getShortcut (  ) 

Creates a shortcut ("Insert Records")

Renvoie:
string Content

user_plaintext::getHTML ( str = array()  ) 

Creates an HTML element (stripping tags of course)

Paramètres:
string HTML content to process. If not passed along, the bodytext field is used.
Renvoie:
string Content

user_plaintext::getHeader (  ) 

Creates a header (used for most elements)

Renvoie:
string Content
Voir également:
renderHeader()

user_plaintext::getImages (  ) 

Get images found in the "image" field of "tt_content"

Renvoie:
string Content

user_plaintext::parseBody ( str  ) 

Parsing the bodytext field content, removing typical entities and
tags.

Paramètres:
string Field content from "bodytext"
Renvoie:
string Processed content

user_plaintext::renderUploads ( str,
upload_path = 'uploads/media/' 
)

Creates a list of links to uploaded files.

Paramètres:
string List of uploaded filenames from "uploads/media/" (or $upload_path)
string Alternative path value
Renvoie:
string Content

user_plaintext::renderHeader ( str,
type = 0 
)

Renders a content element header, observing the layout type giving different header formattings

Paramètres:
string The header string
integer The layout type of the header (in the content element)
Renvoie:
string Content

user_plaintext::pad ( lines,
preLineChar,
len 
)

Function used to repeat a char pattern in head lines (like if you want "********" above/below a header)

Paramètres:
array Array of existing lines to which the new char-pattern should be added
string The character pattern to repeat. Default is "-"
integer The length of the line. $preLineChar will be repeated to fill in this length.
Renvoie:
array The input array with a new line added.
Voir également:
renderHeader()

user_plaintext::breakContent ( str  ) 

Function used to wrap the bodytext field content (or image caption) into lines of a max length of

Paramètres:
string The content to break
Renvoie:
string Processed value.
Voir également:
main_plaintext(), breakLines()

user_plaintext::breakBulletlist ( str  ) 

Breaks content lines into a bullet list

Paramètres:
string Content string to make into a bullet list
Renvoie:
string Processed value

user_plaintext::breakTable ( str  ) 

Formatting a table in plain text (based on the paradigm of lines being content rows and cells separated by "|")

Paramètres:
string Content string
Renvoie:
string Processed value

user_plaintext::addDiv ( messure,
content,
divChar,
joinChar,
cols 
)

Subfunction for breakTable(): Adds a divider line between table rows.

Paramètres:
array Some information about sizes
string Empty string.
string Character to use for the divider line, typically "-"
string Join character, typically "+"
integer Number of table columns
Renvoie:
string Divider line for the table private
Voir également:
breakTable()

user_plaintext::traverseTable ( tableLines  ) 

Traverses the table lines/cells and creates arrays with statistics for line numbers and lengths

Paramètres:
array Array with [table rows] [table cells] [lines in cell]
Renvoie:
array Statistics (max lines/lengths) private
Voir également:
breakTable()

user_plaintext::renderImages ( str,
links,
caption,
upload_path = 'uploads/pics/' 
)

Render block of images - which means creating lines with links to the images.

Paramètres:
string List of image filenames (from "image" field in tt_content records)
string Link value from the "image_link" field in tt_content records
string Caption text
string Alternative relative path for the files listed in $str
Renvoie:
string Content
Voir également:
getImages()

user_plaintext::getLink ( ll  ) 

Returns a typolink URL based on input.

Paramètres:
string Parameter to typolink
Renvoie:
string The URL returned from $this->cObj->getTypoLink_URL(); - possibly it prefixed with the URL of the site if not present already

user_plaintext::breakLines ( str,
implChar = "\n",
charWidth = 0 
)

Breaking lines into fixed length lines, using t3lib_div::breakLinesForEmail()

Paramètres:
string The string to break
string Line break character
integer Length of lines, default is $this->charWidth
Renvoie:
string Processed string
Voir également:
t3lib_div::breakLinesForEmail()

user_plaintext::getString ( str  ) 

Explodes a string with "|" and if the second part is found it will return this, otherwise the first part. Used for many TypoScript properties used in this class since they need preceeding whitespace to be preserved.

Paramètres:
string Input string
Renvoie:
string Output string private

user_plaintext::userProcess ( mConfKey,
passVar 
)

Calls a user function for processing of data

Paramètres:
string TypoScript property name, pointing to the definition of the user function to call (from the TypoScript array internally in this class). This array is passed to the user function. Notice that "parentObj" property is a reference to this class ($this)
mixed Variable to process
Renvoie:
mixed The processed $passVar as returned by the function call

user_plaintext::atag_to_http ( content,
conf 
)

Function used by TypoScript "parseFunc" to process links in the bodytext. Extracts the link and shows it in plain text in a parathesis next to the link text. If link was relative the site URL was prepended.

Paramètres:
string Empty, ignore.
array TypoScript parameters
Renvoie:
string Processed output.
Voir également:
parseBody()

user_plaintext::typolist ( content,
conf 
)

User function (called from TypoScript) for generating a bullet list (used in parsefunc)

Paramètres:
string Empty, ignore.
array TypoScript parameters
Renvoie:
string Processed output.

user_plaintext::typohead ( content,
conf 
)

User function (called from TypoScript) for generating a typo header tag (used in parsefunc)

Paramètres:
string Empty, ignore.
array TypoScript parameters
Renvoie:
string Processed output.

user_plaintext::typocode ( content,
conf 
)

User function (called from TypoScript) for generating a code listing (used in parsefunc)

Paramètres:
string Empty, ignore.
array TypoScript parameters
Renvoie:
string Processed output.


Documentation des données membres

user_plaintext::$cObj

user_plaintext::$conf = array()

user_plaintext::$charWidth = 76


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:44:20 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3