Class cContentTypeTeaser
Content type CMS_TEASER which lets the editor select articles in various ways which are displayed as teasers.
- cContentTypeAbstract
- cContentTypeAbstractTabbed
- cContentTypeTeaser
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Trautmann, Simon Sprankel
Located at classes/content_types/class.content.type.teaser.php
public
|
#
__construct( string $rawSettings, integer $id, array $contentTypes )
Initialises class attributes and handles store events. |
public static
array
|
|
private
|
|
public
string
|
#
generateViewCode( )
Generates the code which should be shown if this content type is shown in the frontend. |
public
array
|
|
public
mixed
|
#
generateTeaserCode( boolean $returnAsArray = false )
Function is called in edit- and viewmode in order to generate teasercode for output |
private
boolean
|
#
_fillTeaserTemplateEntry(
In edit and view mode this function fills teaser template with informations from a CONTENIDO article object. |
private
string
|
#
_getArtContent(
Teaser allows to get a list of ids in which article content is searched in article like 1,2,5,6 the result with largest character count is returned |
private
img
|
#
_extractImage( string $content )
When a HTML Code is given for a Teaser image try to find a image in this code and generate Teaser image on that basis |
private
string
|
#
_getImage( integer $image, integer $maxX, integer $maxY, boolean $cropped, mixed $isFile = false )
Function gets path to an image of base of idupload in CONTENIDO, scales this image on basis of teaser settings and returns path to scaled image. It is also possible to give path to image directly, in this case set fourth parameter to true |
public
string
|
|
private
|
#
_initCmsTypes( )
Gets all currenty avariable content types and their ids from database and store it into class variable aCMSTypes. Because this information is used multiple times, this causes a better performance than gettting it seperately |
private
string
|
|
private
html
|
#
_generateCountSelect( )
Generats a select box for setting number of articles which should be displayed in teaser as a maximum. Only important in editmode. |
private
html
|
#
_generateStyleSelect( )
Generats a select box for setting teaser style currently two seperate teaser templates were supported |
private
html
|
#
_generateTypeSelect( string $selectName, string $selected, string $value )
Teaser gets informations from other articles and their content typs Function builds a select box in which coresponding cms type can be selected after that a text box is rendered for setting id for this conent type to get informations from. This function is used three times for source defintion of headline text and teaserimage |
private
string
|
#
_generateTabAdvanced( )
Generates code for the advanced tab in which various advanced settings can be made. |
private
html
|
|
private
html
|
#
_generateSortOrderSelect( )
Function which generated a select box for setting teaser sort order argument |
private
html
|
|
private
string
|
#
_generateTabManual( )
Generates code for the manual tab in which various settings for the manual teaser can be made. |
private
string
|
_generateActionCode(),
_generateTabMenuCode()
|
SETTINGS_TYPE_PLAINTEXT,
SETTINGS_TYPE_XML
|
private
array
|
$_cmsTypes |
|
#
Array which contains all avariable CMS_Types and its ids in current CONTENIDO isntallation (described as hash [idtype => cmstypename]) |
private
array
|
$_ignoreTypes | array() |
#
Content types in this array will be completely ignored by CMS_TEASER They won't be displayed in the frontend and they won't be shown as an option in the backend |
private
array
|
$_forwardTypes | array(
"CMS_EASYIMG" => "CMS_IMGEDITOR",
"CMS_IMG" => "CMS_IMGEDITOR",
"CMS_LINK" => "CMS_LINKEDITOR"
) |
#
If CMS_TEASER tries to load one of the content types listed as the keys of this array it will load the value of that key instead These won't be listed as an option in the backend either |
protected static
array
|
$_translations | array(
"MORE"
) |
#
Placeholders for labels in frontend. Important: This must be a static array! |
protected
integer
|
$iteration | 0 |
#
Variable for detecting current interation |
$_cfg,
$_cfgClient,
$_client,
$_contentTypes,
$_formFields,
$_id,
$_idArt,
$_idArtLang,
$_idCat,
$_lang,
$_prefix,
$_rawSettings,
$_session,
$_settings,
$_settingsType,
$_type,
$_uploadPath,
$_useXHTML
|