‪TYPO3CMS  10.4
TYPO3\CMS\Frontend\ContentObject\ImageContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\ImageContentObject:
TYPO3\CMS\Frontend\ContentObject\AbstractContentObject

Public Member Functions

string render ($conf=[])
 
string getAltParam ($conf, $longDesc=true)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 __construct (ContentObjectRenderer $cObj)
 
ContentObjectRenderer getContentObjectRenderer ()
 

Protected Member Functions

string cImage ($file, $conf)
 
string getBorderAttr ($borderAttr)
 
string getImageTagTemplate ($layoutKey, $conf)
 
string getImageSourceCollection ($layoutKey, $conf, $file)
 
string linkWrap ($content, $wrap)
 
TypoScriptFrontendController getTypoScriptFrontendController ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
PageRenderer getPageRenderer ()
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
ContentObjectRenderer $cObj
 
PageRenderer $pageRenderer
 

Detailed Description

Contains IMAGE class object.

Definition at line 28 of file ImageContentObject.php.

Member Function Documentation

◆ cImage()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::cImage (   $file,
  $conf 
)
protected

Returns a tag with the image file defined by $file and processed according to the properties in the TypoScript array. Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript.

Parameters
string$file‪File TypoScript resource
array$conf‪TypoScript configuration properties
Returns
‪string HTML tag, (possibly wrapped in links and other HTML) if any image found.

Definition at line 57 of file ImageContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getAltParam(), TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getBorderAttr(), TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getImageSourceCollection(), TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getImageTagTemplate(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getTypoScriptFrontendController(), and TYPO3\CMS\Frontend\ContentObject\ImageContentObject\linkWrap().

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\render().

◆ getAltParam()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::getAltParam (   $conf,
  $longDesc = true 
)

An abstraction method which creates an alt or title parameter for an HTML img, applet, area or input element and the FILE content element. From the $conf array it implements the properties "altText", "titleText" and "longdescURL"

Parameters
array$conf‪TypoScript configuration properties
bool$longDesc‪If set, the longdesc attribute will be generated - must only be used for img elements!
Returns
‪string Parameter string containing alt and title parameters (if any)
See also
cImage()

Definition at line 318 of file ImageContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().

◆ getBorderAttr()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::getBorderAttr (   $borderAttr)
protected

Returns the 'border' attribute for an tag only if the doctype is not xhtml_strict, xhtml_11 or html5 or if the config parameter 'disableImgBorderAttr' is not set.

Parameters
string$borderAttr‪The border attribute
Returns
‪string The border attribute

Definition at line 124 of file ImageContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().

◆ getImageSourceCollection()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::getImageSourceCollection (   $layoutKey,
  $conf,
  $file 
)
protected

Render alternate sources for the image tag. If no source collection is given an empty string is returned.

Parameters
string$layoutKey‪rendering key
array$conf‪TypoScript configuration properties
string$file
Exceptions

Definition at line 166 of file ImageContentObject.php.

References $GLOBALS, TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getTypoScriptFrontendController(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().

◆ getImageTagTemplate()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::getImageTagTemplate (   $layoutKey,
  $conf 
)
protected

Returns the html-template for rendering the image-Tag if no template is defined via typoscript the default tag template is returned

Parameters
string$layoutKey‪rendering key
array$conf‪TypoScript configuration properties
Returns
‪string

Definition at line 146 of file ImageContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().

◆ getTypoScriptFrontendController()

◆ linkWrap()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::linkWrap (   $content,
  $wrap 
)
protected

Wraps the input string by the $wrap value and implements the "linkWrap" data type as well. The "linkWrap" data type means that this function will find any integer encapsulated in {} (curly braces) in the first wrap part and substitute it with the corresponding page uid from the rootline where the found integer is pointing to the key in the rootline. See link below.

Parameters
string$content‪Input string
string$wrap‪A string where the first two parts separated by "|" (vertical line) will be wrapped around the input string
Returns
‪string Wrapped output string
See also
‪wrap()
cImage()

Definition at line 297 of file ImageContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\ImageContentObject\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().

◆ render()

string TYPO3\CMS\Frontend\ContentObject\ImageContentObject::render (   $conf = [])

Rendering the cObject, IMAGE

Parameters
array$conf‪Array of TypoScript properties
Returns
‪string Output

Reimplemented from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject.

Definition at line 36 of file ImageContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\ImageContentObject\cImage().