[ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
Soft Reference processing class "Soft References" are references to database elements, files, email addresses, URls etc. which are found in-text in content. The <link [page_id]> tag from typical bodytext fields are an example of this. This class contains generic parsers for the most well-known types which are default for most TYPO3 installations. Soft References can also be userdefined. The Soft Reference parsers are used by the system to find these references and process them accordingly in import/export actions and copy operations. $Id: class.t3lib_softrefproc.php 1770 2006-10-25 10:27:07Z typo3 $
Author: | Kasper Skaarhoj <kasperYYYY@typo3.com> |
Poids: | 848 lignes (31 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
t3lib_softrefproc:: (14 méthodes):
findRef()
findRef_images()
findRef_typolink()
findRef_typolink_tag()
findRef_TStemplate()
findRef_TSconfig()
findRef_email()
findRef_url()
findRef_extension_fileref()
fileadminReferences()
getTypoLinkParts()
setTypoLinkPartsElement()
getPageIdFromAlias()
makeTokenID()
Classe: t3lib_softrefproc - X-Ref
Class for processing of the default soft reference types for CMS:findRef($table, $field, $uid, $content, $spKey, $spParams, $structurePath='') X-Ref |
Main function through which all processing happens param: string Database table name param: string Field name for which processing occurs param: integer UID of the record param: string The content/value of the field param: string The softlink parser key. This is only interesting if more than one parser is grouped in the same class. That is the case with this parser. param: array Parameters of the softlink parser. Basically this is the content inside optional []-brackets after the softref keys. Parameters are exploded by ";" param: string If running from inside a FlexForm structure, this is the path of the tag. return: array Result array on positive matches, see description above. Otherwise false |
findRef_images($content, $spParams) X-Ref |
Finding image tags in the content. All images that are not from external URLs will be returned with an info text Will only return files in fileadmin/ and files in uploads/ folders which are prefixed with "RTEmagic[C|P]_" for substitution Any "clear.gif" images are ignored. param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_typolink($content, $spParams) X-Ref |
TypoLink value processing. Will process input value as a TypoLink value. param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns. value "linkList" will split the string by comma before processing. return: array Result array on positive matches, see description above. Otherwise false |
findRef_typolink_tag($content, $spParams) X-Ref |
TypoLink tag processing. Will search for <link ...> tags in the content string and process any found. param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_TStemplate($content, $spParams) X-Ref |
Processing the content expected from a TypoScript template This content includes references to files in fileadmin/ folders and file references in HTML tags like <img src="">, <a href=""> and <form action=""> param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_TSconfig($content, $spParams) X-Ref |
Processes possible references inside of Page and User TSconfig fields. Currently this only includes file references to fileadmin/ but in fact there are currently no properties that supports such references. param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_email($content, $spParams) X-Ref |
Finding email addresses in content and making them substitutable. param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_url($content, $spParams) X-Ref |
Finding URLs in content param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
findRef_extension_fileref($content, $spParams) X-Ref |
Finding reference to files from extensions in content, but only to notify about their existence. No substitution param: string The input content to analyse param: array Parameters set for the softref parser key in TCA/columns return: array Result array on positive matches, see description above. Otherwise false |
fileadminReferences($content, &$elements) X-Ref |
Searches the content for a reference to a file in "fileadmin/". When a match is found it will get substituted with a token. param: string Input content to analyse param: array Element array to be modified with new entries. Passed by reference. return: string Output content, possibly with tokens inserted. |
getTypoLinkParts($typolinkValue) X-Ref |
Analyse content as a TypoLink value and return an array with properties. TypoLinks format is: <link [typolink] [browser target] [css class]>. See tslib_content::typolink() The syntax of the [typolink] part is: [typolink] = [page id or alias][,[type value]][#[anchor, if integer = tt_content uid]] The extraction is based on how tslib_content::typolink() behaves. param: string TypoLink value. return: array Array with the properties of the input link specified. The key "LINK_TYPE" will reveal the type. If that is blank it could not be determined. |
setTypoLinkPartsElement($tLP, &$elements, $content, $idx) X-Ref |
Recompile a TypoLink value from the array of properties made with getTypoLinkParts() into an elements array param: array TypoLink properties param: array Array of elements to be modified with substitution / information entries. param: string The content to process. param: integer Index value of the found element - user to make unique but stable tokenID return: string The input content, possibly containing tokens now according to the added substitution entries in $elements |
getPageIdFromAlias($link_param) X-Ref |
Look up and return page uid for alias param: integer Page alias string value return: integer Page uid corresponding to alias value. |
makeTokenID($index='') X-Ref |
Make Token ID for input index. param: string suffix value. return: string Token ID |
Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |