Exemplo n.º 1
0
 /**
  * @test
  */
 public function getIconZoom()
 {
     $this->assertTrue(tx_additionalreports_util::getIconZoom() == '<img src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3/sysext/t3skin/icons/gfx/zoom.gif"/>');
 }
 /**
  * Return informations about a ctype or plugin
  *
  * @param array $itemValue
  * @return array
  */
 public static function getContentInfos($itemValue)
 {
     $markersExt = array();
     $domain = tx_additionalreports_util::getDomain($itemValue['pid']);
     $markersExt['domain'] = tx_additionalreports_util::getIconDomain() . $domain;
     $iconPage = $itemValue['hiddenpages'] == 0 ? tx_additionalreports_util::getIconPage() : tx_additionalreports_util::getIconPage(true);
     $iconContent = $itemValue['hiddentt_content'] == 0 ? tx_additionalreports_util::getIconContent() : tx_additionalreports_util::getIconContent(true);
     $markersExt['pid'] = $iconPage . ' ' . $itemValue['pid'];
     $markersExt['uid'] = $iconContent . ' ' . $itemValue['uid'];
     $markersExt['pagetitle'] = $itemValue['title'];
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('templavoila') && class_exists('tx_templavoila_api')) {
         $linkAtt = array('href' => '#', 'title' => self::getLl('switch'), 'onclick' => tx_additionalreports_util::goToModuleList($itemValue['pid']));
         $markersExt['db'] = tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebList());
         $linkAtt = array('href' => tx_additionalreports_util::goToModuleList($itemValue['pid'], true), 'target' => '_blank', 'title' => self::getLl('newwindow'));
         $markersExt['db'] .= tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebList());
         $linkAtt = array('href' => '#', 'title' => self::getLl('switch'), 'onclick' => tx_additionalreports_util::goToModulePageTv($itemValue['pid']));
         $markersExt['page'] = tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebPage());
         $linkAtt = array('href' => tx_additionalreports_util::goToModulePageTv($itemValue['pid'], true), 'target' => '_blank', 'title' => self::getLl('newwindow'));
         $markersExt['page'] .= tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebPage());
         if (tx_additionalreports_util::isUsedInTv($itemValue['uid'], $itemValue['pid'])) {
             $markersExt['usedtv'] = self::getLl('yes');
             $markersExt['usedtvclass'] = ' typo3-message message-ok';
         } else {
             $markersExt['usedtv'] = self::getLl('no');
             $markersExt['usedtvclass'] = ' typo3-message message-error';
         }
     } else {
         $markersExt['usedtv'] = '';
         $markersExt['usedtvclass'] = '';
         $linkAtt = array('href' => '#', 'title' => self::getLl('switch'), 'onclick' => tx_additionalreports_util::goToModuleList($itemValue['pid']));
         $markersExt['db'] = tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebList());
         $linkAtt = array('href' => tx_additionalreports_util::goToModuleList($itemValue['pid'], true), 'target' => '_blank', 'title' => self::getLl('newwindow'));
         $markersExt['db'] .= tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebList());
         $linkAtt = array('href' => '#', 'title' => self::getLl('switch'), 'onclick' => tx_additionalreports_util::goToModulePage($itemValue['pid']));
         $markersExt['page'] = tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebPage());
         $linkAtt = array('href' => tx_additionalreports_util::goToModulePage($itemValue['pid'], true), 'target' => '_blank', 'title' => self::getLl('newwindow'));
         $markersExt['page'] .= tx_additionalreports_util::generateLink($linkAtt, tx_additionalreports_util::getIconWebPage());
     }
     $markersExt['preview'] = '<a target="_blank" href="http://' . $domain . '/index.php?id=' . $itemValue['pid'] . '">';
     $markersExt['preview'] .= tx_additionalreports_util::getIconZoom();
     $markersExt['preview'] .= '</a>';
     return $markersExt;
 }