17 use \TYPO3\CMS\Core\Utility\HttpUtility;
18 use \TYPO3\CMS\Core\Utility\GeneralUtility;
19 use \TYPO3\CMS\Core\Utility\MathUtility;
87 <title>###TITLE###</title>
88 <meta name=
"robots" content=
"noindex,follow" />
96 protected $imageTag =
'<img src="###publicUrl###" alt="###alt###" title="###title###" />';
113 if (!$fileUid || !isset($parametersArray) || !is_array($parametersArray)) {
118 $parametersEncoded = implode(
'', $parametersArray);
120 if (
$hmac !== $this->hmac) {
126 $parameters = unserialize(base64_decode($parametersEncoded));
127 foreach (
$parameters as $parameterName => $parameterValue) {
128 $this->{$parameterName} = $parameterValue;
150 $imageTagMarkers = array(
151 '###publicUrl###' => htmlspecialchars($processedImage->getPublicUrl()),
152 '###alt###' => htmlspecialchars($this->file->getProperty(
'alternative') ?:
$this->title),
153 '###title###' => htmlspecialchars($this->file->getProperty(
'title') ?:
$this->title)
155 $this->imageTag = str_replace(array_keys($imageTagMarkers), array_values($imageTagMarkers), $this->imageTag);
156 if ($this->wrap !==
'|') {
157 $wrapParts = explode(
'|', $this->wrap, 2);
158 $this->imageTag = $wrapParts[0] . $this->imageTag . $wrapParts[1];
160 $markerArray = array(
161 '###TITLE###' => ($this->file->getProperty(
'title') ?:
$this->title),
162 '###IMAGE###' => $this->imageTag,
163 '###BODY###' => $this->bodyTag
166 $this->content = str_replace(array_keys($markerArray), array_values($markerArray), $this->content);
175 if (strstr($this->width . $this->height,
'm')) {
183 $processingConfiguration = array(
184 'width' => $this->width,
185 'height' => $this->height,
186 'frame' => $this->frame,
189 return $this->file->process(
'Image.CropScaleMask', $processingConfiguration);
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static canBeInterpretedAsInteger($var)
static hmac($input, $additionalSecret='')
static setResponseCodeAndExit($httpStatus=self::HTTP_STATUS_303)