/**
  * Preprocesses the preview rendering of a content element of type "multimedia"
  *
  * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
  * @param bool $drawItem Whether to draw the item using the default functionality
  * @param string $headerContent Header content
  * @param string $itemContent Item content
  * @param array $row Record row of tt_content
  *
  * @return void
  */
 public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
 {
     if ($row['CType'] === 'multimedia' && $row['multimedia']) {
         $itemContent .= $parentObject->renderText($row['multimedia']) . '<br />';
         $itemContent .= $parentObject->renderText($row['parameters']) . '<br />';
         $drawItem = false;
     }
 }
Exemplo n.º 2
0
 /**
  * Preprocesses the preview rendering of a content element of type "script"
  *
  * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
  * @param bool $drawItem Whether to draw the item using the default functionality
  * @param string $headerContent Header content
  * @param string $itemContent Item content
  * @param array $row Record row of tt_content
  *
  * @return void
  */
 public function preProcess(PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
 {
     if ($row['CType'] === 'script') {
         $itemContent .= $this->getLanguageService()->sL(BackendUtility::getItemLabel('tt_content', 'select_key'), TRUE) . ' ' . $row['select_key'] . '<br />';
         $itemContent .= '<br />' . $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
         $itemContent .= '<br />' . $parentObject->linkEditContent($parentObject->renderText($row['imagecaption']), $row) . '<br />';
         $drawItem = FALSE;
     }
 }
 /**
  * Preprocesses the preview rendering of a content element of type "mailform"
  *
  * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
  * @param bool $drawItem Whether to draw the item using the default functionality
  * @param string $headerContent Header content
  * @param string $itemContent Item content
  * @param array $row Record row of tt_content
  *
  * @return void
  */
 public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
 {
     if ($row['CType'] === 'mailform') {
         $itemContent = $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
         $drawItem = false;
     }
 }
 /**
  * Preprocesses the preview rendering of a content element of type "textmedia"
  *
  * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
  * @param bool $drawItem Whether to draw the item using the default functionality
  * @param string $headerContent Header content
  * @param string $itemContent Item content
  * @param array $row Record row of tt_content
  *
  * @return void
  */
 public function preProcess(PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
 {
     if ($row['CType'] === 'textmedia') {
         if ($row['bodytext']) {
             $itemContent .= $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
         }
         if ($row['assets']) {
             $itemContent .= $parentObject->linkEditContent($parentObject->getThumbCodeUnlinked($row, 'tt_content', 'assets'), $row) . '<br />';
             $fileReferences = BackendUtility::resolveFileReferences('tt_content', 'assets', $row);
             if (!empty($fileReferences)) {
                 $linkedContent = '';
                 foreach ($fileReferences as $fileReference) {
                     $linkedContent .= htmlspecialchars($fileReference->getDescription()) . '<br />';
                 }
                 $itemContent .= $parentObject->linkEditContent($linkedContent, $row);
                 unset($linkedContent);
             }
         }
         $drawItem = false;
     }
 }
Exemplo n.º 5
0
 /**
  * Preprocesses the preview rendering of the content element "textpic".
  *
  * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
  * @param bool $drawItem Whether to draw the item using the default functionalities
  * @param string $headerContent Header content
  * @param string $itemContent Item content
  * @param array $row Record row of tt_content
  * @return void
  */
 public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
 {
     if ($row['CType'] === 'textpic') {
         if ($row['bodytext']) {
             $itemContent .= $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
         }
         if ($row['image']) {
             $itemContent .= $parentObject->linkEditContent($parentObject->getThumbCodeUnlinked($row, 'tt_content', 'image'), $row);
             $fileReferences = \TYPO3\CMS\Backend\Utility\BackendUtility::resolveFileReferences('tt_content', 'image', $row);
             if (!empty($fileReferences)) {
                 $linkedContent = '';
                 foreach ($fileReferences as $fileReference) {
                     $description = $fileReference->getDescription();
                     if ($description !== NULL && $description !== '') {
                         $linkedContent .= htmlspecialchars($description) . '<br />';
                     }
                 }
                 $itemContent .= $parentObject->linkEditContent($linkedContent, $row);
                 unset($linkedContent);
             }
         }
         $drawItem = FALSE;
     }
 }