TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CssStyledContentController Class Reference
Inheritance diagram for CssStyledContentController:
AbstractPlugin

Public Member Functions

 render_table ($content, $conf)
 
 renderSpace ($content, array $configuration)
 
 getTableAttributes ($conf, $type)
 
 hookRequest ($functionName)
 
- Public Member Functions inherited from AbstractPlugin
 pi_setPiVarDefaults ()
 
 pi_getPageLink ($id, $target= '', $urlParameters=[])
 
 pi_linkToPage ($str, $id, $target= '', $urlParameters=[])
 
 pi_linkTP ($str, $urlParameters=[], $cache=false, $altPageId=0)
 
 pi_linkTP_keepPIvars ($str, $overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_linkTP_keepPIvars_url ($overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_list_linkSingle ($str, $uid, $cache=false, $mergeArr=[], $urlOnly=false, $altPageId=0)
 
 pi_openAtagHrefInJSwindow ($str, $winName= '', $winParams= 'width=670, height=500, status=0, menubar=0, scrollbars=1, resizable=1')
 
 pi_list_browseresults ($showResultCount=1, $tableParams= '', $wrapArr=[], $pointerName= 'pointer', $hscText=true, $forceOutput=false)
 
 pi_list_modeSelector ($items=[], $tableParams= '')
 
 pi_list_makelist ($statement, $tableParams= '')
 
 pi_list_row ($c)
 
 pi_list_header ()
 
 pi_getClassName ($class)
 
 pi_classParam ($class, $addClasses= '')
 
 pi_wrapInBaseClass ($str)
 
 pi_getEditPanel ($row=[], $tablename= '', $label= '', $conf=[])
 
 pi_getEditIcon ($content, $fields, $title= '', $row=[], $tablename= '', $oConf=[])
 
 pi_getLL ($key, $alternativeLabel= '', $hsc=false)
 
 pi_exec_query ($table, $count=false, $addWhere= '', $mm_cat= '', $groupBy= '', $orderBy= '', $query= '')
 
 pi_getRecord ($table, $uid, $checkPage=false)
 
 pi_getPidList ($pid_list, $recursive=0)
 
 pi_prependFieldsWithTable ($table, $fieldList)
 
 pi_getCategoryTableContents ($table, $pid, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '')
 
 pi_isOnlyFields ($fList, $lowerThan=-1)
 
 pi_autoCache ($inArray)
 
 pi_RTEcssText ($str)
 
 pi_initPIflexForm ($field= 'pi_flexform')
 
 pi_getFFvalue ($T3FlexForm_array, $fieldName, $sheet= 'sDEF', $lang= 'lDEF', $value= 'vDEF')
 
 pi_getFFvalueFromSheetArray ($sheetArray, $fieldNameArr, $value)
 

Public Attributes

 $prefixId = 'tx_cssstyledcontent_pi1'
 
 $scriptRelPath = 'Classes/Controller/CssStyledContentController.php'
 
 $extKey = 'css_styled_content'
 
 $conf = []
 
- Public Attributes inherited from AbstractPlugin
 $cObj
 
 $prefixId
 
 $scriptRelPath
 
 $extKey
 
 $piVars
 
 $internal = ['res_count' => 0
 
 $LOCAL_LANG = []
 
 $LOCAL_LANG_loaded = false
 
 $LLkey = 'default'
 
 $altLLkey = ''
 
 $LLtestPrefix = ''
 
 $LLtestPrefixAlt = ''
 
 $pi_isOnlyFields = 'mode,pointer'
 
 $pi_alwaysPrev = 0
 
 $pi_lowerThan = 5
 
 $pi_moreParams = ''
 
 $pi_listFields = '*'
 
 $pi_autoCacheFields = []
 
 $pi_autoCacheEn = false
 
 $pi_USER_INT_obj = false
 
 $pi_checkCHash = false
 
 $conf = []
 
 $pi_EPtemp_cObj
 
 $pi_tmpPageId = 0
 

Protected Member Functions

 getImgColumnRelations ($conf, $colCount)
 
 getImgColumnWidths ($conf, $colCount, $netW)
 
 initializeCurrentFileInContentObjectRenderer ($fileUid, $treatAsReference)
 
 addPageStyle ($selector, $declaration)
 
 getResourceFactory ()
 
- Protected Member Functions inherited from AbstractPlugin
 applyStdWrapRecursive (array $conf, $level=0)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractPlugin
 $LOCAL_LANG_UNSET = []
 
 $frontendController
 
 $databaseConnection
 

Detailed Description

Plugin class - instantiated from TypoScript. Rendering some content elements from tt_content table.

Definition at line 24 of file CssStyledContentController.php.

Member Function Documentation

addPageStyle (   $selector,
  $declaration 
)
protected

Add a style to the page, specific for this page

The selector can be a contextual selector, like '#id .class p' The presence of the selector is checked to avoid multiple entries of the same selector.

Parameters
string$selectorThe selector
string$declarationThe declaration
Returns
void

Definition at line 1042 of file CssStyledContentController.php.

Referenced by CssStyledContentController\getTableAttributes(), and CssStyledContentController\renderSpace().

getImgColumnRelations (   $conf,
  $colCount 
)
protected

Returns an array containing width relations for $colCount columns.

Tries to use "colRelations" setting given by TS. uses "1:1" column relations by default.

Parameters
array$confTS configuration for img
int$colCountnumber of columns
Returns
array

Definition at line 192 of file CssStyledContentController.php.

References CssStyledContentController\$conf, and GeneralUtility\devLog().

Referenced by CssStyledContentController\getImgColumnWidths().

getImgColumnWidths (   $conf,
  $colCount,
  $netW 
)
protected

Returns an array containing the image widths for an image row with $colCount columns.

Parameters
array$confTS configuration of img
int$colCountnumber of columns
int$netWmax usable width for images (without spaces and borders)
Returns
array

Definition at line 236 of file CssStyledContentController.php.

References CssStyledContentController\$conf, and CssStyledContentController\getImgColumnRelations().

getResourceFactory ( )
protected

Get the ResourceFactory

Returns

Definition at line 1075 of file CssStyledContentController.php.

getTableAttributes (   $conf,
  $type 
)

Returns table attributes for uploads / tables.

Parameters
array$confTypoScript configuration array
int$typeThe "layout" type
Returns
array Array with attributes inside.

Definition at line 976 of file CssStyledContentController.php.

References CssStyledContentController\$conf, CssStyledContentController\addPageStyle(), and AbstractPlugin\pi_getFFvalue().

hookRequest (   $functionName)

Returns an object reference to the hook object if any

Parameters
string$functionNameName of the function you want to call / hook key
Returns
object|NULL Hook object, if any. Otherwise NULL.

Definition at line 1058 of file CssStyledContentController.php.

References $GLOBALS, and GeneralUtility\getUserObj().

Referenced by CssStyledContentController\render_table(), and CssStyledContentController\renderSpace().

initializeCurrentFileInContentObjectRenderer (   $fileUid,
  $treatAsReference 
)
protected

Loads the file / file reference object and sets it in the currentFile property of the ContentObjectRenderer.

This makes the file data available during image rendering.

Parameters
int$fileUidThe UID of the file or file reference (depending on $treatAsReference) that should be loaded.
bool$treatAsReferenceIf TRUE the given UID will be used to load a file reference otherwise it will be used to load a regular file.
Returns
void

Definition at line 912 of file CssStyledContentController.php.

References ResourceFactory\getInstance().

render_table (   $content,
  $conf 
)

Rendering the "Table" type content element, called from TypoScript (tt_content.table.20)

Parameters
string$contentContent input. Not used, ignore.
array$confTypoScript configuration
Returns
string HTML output.

Definition at line 63 of file CssStyledContentController.php.

References CssStyledContentController\$conf, MathUtility\forceIntegerInRange(), CssStyledContentController\hookRequest(), GeneralUtility\implodeAttributes(), AbstractPlugin\pi_getFFvalue(), AbstractPlugin\pi_initPIflexForm(), and GeneralUtility\trimExplode().

renderSpace (   $content,
array  $configuration 
)

Add top or bottom margin to the content element

Constructs and adds a class to the content element. This class selector and its declaration are added to the specific page styles.

Parameters
string$contentContent input. Not used, ignore.
array$configurationTypoScript configuration
Returns
string The class name

Definition at line 937 of file CssStyledContentController.php.

References CssStyledContentController\addPageStyle(), and CssStyledContentController\hookRequest().

Member Data Documentation

$extKey = 'css_styled_content'

Definition at line 45 of file CssStyledContentController.php.

$prefixId = 'tx_cssstyledcontent_pi1'

Definition at line 31 of file CssStyledContentController.php.

$scriptRelPath = 'Classes/Controller/CssStyledContentController.php'

Definition at line 38 of file CssStyledContentController.php.