Example #1
0
 /**
  * @param array $row
  * @param Column $column
  * @param integer $colPosFluxContent
  * @param PageLayoutView $dblist
  * @param integer $target
  * @param string $id
  * @param string $content
  * @return string
  */
 protected function parseGridColumnTemplate(array $row, Column $column, $colPosFluxContent, $dblist, $target, $id, $content)
 {
     return sprintf($this->templates['gridColumn'], $column->getColspan(), $column->getRowspan(), $column->getStyle(), $colPosFluxContent, $dblist->tt_contentConfig['sys_language_uid'], $dblist->tt_contentConfig['sys_language_uid'], $column->getLabel(), $target, $id, $this->drawNewIcon($row, $column) . $this->drawPasteIcon($row, $column) . $this->drawPasteIcon($row, $column, TRUE), $content);
 }
Example #2
0
 /**
  * @param array $row
  * @param Column $column
  * @param integer $colPosFluxContent
  * @param PageLayoutView $dblist
  * @param integer $target
  * @param string $id
  * @param string $content
  * @return string
  */
 protected function parseGridColumnTemplate(array $row, Column $column, $colPosFluxContent, $dblist, $target, $id, $content)
 {
     $label = $column->getLabel();
     if (strpos($label, 'LLL:') === 0) {
         $label = LocalizationUtility::translate($label, ExtensionNamingUtility::getExtensionName($column->getExtensionName()));
         if (empty($label)) {
             $label = $column->getLabel();
         }
     }
     // this variable defines if this drop-area gets activated on drag action
     // of a ce with the same data-language_uid
     $templateClassJsSortableLanguageId = $row['sys_language_uid'];
     // this variable defines which drop-areas will be activated
     // with a drag action of this element
     $templateDataLanguageUid = $row['sys_language_uid'];
     // but for language mode all (uid -1):
     if ((int) $row['sys_language_uid'] === -1) {
         /** @var \TYPO3\CMS\Backend\Controller\PageLayoutController $pageLayoutController */
         $pageLayoutController = $GLOBALS['SOBE'];
         $isColumnView = (int) $pageLayoutController->MOD_SETTINGS['function'] === 1;
         $isLanguagesView = (int) $pageLayoutController->MOD_SETTINGS['function'] === 2;
         if ($isColumnView) {
             $templateClassJsSortableLanguageId = $pageLayoutController->current_sys_language;
             $templateDataLanguageUid = $pageLayoutController->current_sys_language;
         } elseif ($isLanguagesView) {
             // If this is a language-all (uid -1) grid-element in languages-view
             // we use language-uid 0 for this elements drop-areas.
             // This can be done because a ce with language-uid -1 in languages view
             // is in TYPO3 7.6.4 only displayed in the default-language-column (maybe a bug atm.?).
             // Additionally there is no access to the information which
             // language column is currently rendered from here!
             // ($lP in typo3/cms/typo3/sysext/backend/Classes/View/PageLayoutView.php L485)
             $templateClassJsSortableLanguageId = 0;
             $templateDataLanguageUid = 0;
         }
     }
     return sprintf($this->templates['gridColumn'], $column->getColspan(), $column->getRowspan(), $column->getStyle(), $colPosFluxContent, $templateClassJsSortableLanguageId, $templateDataLanguageUid, $label, $target, $id, $this->drawNewIcon($row, $column) . $this->drawPasteIcon($row, $column) . $this->drawPasteIcon($row, $column, TRUE), $content);
 }