/**
  * This method renders the report
  *
  * @return    string    The status report as HTML
  */
 public function getReport()
 {
     $actionURL = tx_additionalreports_util::getBaseUrl() . '&cmd=deleteAll';
     $content = '<a href="' . $actionURL . '"><img src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . '../typo3conf/ext/additional_reports/Resources/Public/Icons/garbage.gif"/> ' . $GLOBALS['LANG']->getLL('flushalllog') . '</a>';
     $content .= tx_additionalreports_main::displayRealUrlErrors();
     return $content;
 }
 /**
  * This method renders the report
  *
  * @return    string    The status report as HTML
  */
 public function getReport()
 {
     $this->setCss(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('additional_reports') . 'Resources/Public/Shadowbox/shadowbox.css');
     $this->setJs(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('additional_reports') . 'Resources/Public/Shadowbox/shadowbox.js');
     $content = tx_additionalreports_main::displayExtensions();
     return $content;
 }
 /**
  * Constructor for class tx_additionalreports_report
  *
  * @param    object    Back-reference to the calling reports module
  */
 public function __construct($reportObject)
 {
     $this->reportObject = $reportObject;
     // include Css files
     $this->setCss(tx_additionalreports_main::getCss());
     // include LL
     $GLOBALS['LANG']->includeLLFile('EXT:additional_reports/locallang.xml');
 }
Ejemplo n.º 4
0
 /**
  * Renders else-child or else-argument if variable $item is in $list
  *
  * @param string $list
  * @param string $item
  * @return string
  */
 public function render()
 {
     $item = $this->arguments['item'];
     $as = $this->arguments['as'];
     $plugin = $this->arguments['plugin'];
     $ctype = $this->arguments['ctype'];
     // plugin
     if ($plugin === TRUE) {
         foreach ($GLOBALS['TCA']['tt_content']['columns']['list_type']['config']['items'] as $itemKey => $itemValue) {
             if (trim($itemValue[1]) == $item['list_type']) {
                 preg_match('/EXT:(.*?)\\//', $itemValue[0], $ext);
                 preg_match('/^LLL:(EXT:.*?):(.*)/', $itemValue[0], $llfile);
                 $localLang = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llfile[1], $GLOBALS['LANG']->lang);
                 $item['iconext'] = tx_additionalreports_util::getExtIcon($ext[1]);
                 $item['extension'] = $ext[1];
                 $item['plugin'] = $GLOBALS['LANG']->getLLL($llfile[2], $localLang) . ' (' . $item['list_type'] . ')';
             } else {
                 $item['plugin'] = $item['list_type'];
             }
         }
     }
     // CType
     if ($ctype === TRUE) {
         foreach ($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'] as $itemValue) {
             if ($itemValue[1] != '--div--') {
                 if (trim($itemValue[1]) == $item['CType']) {
                     preg_match('/^LLL:(EXT:.*?):(.*)/', $itemValue[0], $llfile);
                     $localLang = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llfile[1], $GLOBALS['LANG']->lang);
                     $item['iconext'] = tx_additionalreports_util::getContentTypeIcon($itemValue[2]);
                     $item['ctype'] = $GLOBALS['LANG']->getLLL($llfile[2], $localLang) . ' (' . $item['CType'] . ')';
                 } else {
                     $item['ctype'] = $item['CType'];
                 }
             }
         }
     }
     $item = array_merge($item, tx_additionalreports_main::getContentInfos($item));
     if ($this->templateVariableContainer->exists($as)) {
         $this->templateVariableContainer->remove($as);
     }
     $this->templateVariableContainer->add($as, $item);
 }
    /**
     * This method renders the report
     *
     * @return    string    The status report as HTML
     */
    public function getReport()
    {
        $content = '<p class="help">' . $GLOBALS['LANG']->getLL('status_description') . '</p>';
        if (!isset($this->reportObject->doc)) {
            $this->reportObject->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        }
        $this->reportObject->doc->getPageRenderer()->loadExtJS();
        $this->reportObject->doc->getPageRenderer()->addExtOnReadyCode('
			Ext.select("h2.section-header").each(function(element){
				element.on("click", function(event, tag) {
					var state = 0,
						el = Ext.fly(tag),
						div = el.next("div"),
						saveKey = el.getAttribute("rel");
					if (el.hasClass("collapsed")) {
						el.removeClass("collapsed").addClass("expanded");
						div.slideIn("t", {
							easing: "easeIn",
							duration: .5
						});
					} else {
						el.removeClass("expanded").addClass("collapsed");
						div.slideOut("t", {
							easing: "easeOut",
							duration: .5,
							remove: false,
							useDisplay: true
						});
						state = 1;
					}
					if (saveKey) {
						try {
							top.TYPO3.BackendUserSettings.ExtDirect.set(saveKey + "." + tag.id, state, function(response) {});
						} catch(e) {}
					}
				});
			});
		');
        $content .= tx_additionalreports_main::displayStatus();
        return $content;
    }
 /**
  * This method renders the report
  *
  * @return    string    The status report as HTML
  */
 public function getReport()
 {
     $content = tx_additionalreports_main::displayAjax();
     return $content;
 }
 /**
  * This method renders the report
  *
  * @return    string    The status report as HTML
  */
 public function getReport()
 {
     $content = '<p class="help">' . $GLOBALS['LANG']->getLL('dbcheck_description') . '</p>';
     $content .= tx_additionalreports_main::displayDbCheck();
     return $content;
 }
Ejemplo n.º 8
0
 /**
  * @test
  */
 public function displayDbCheck()
 {
     $str = tx_additionalreports_main::displayDbCheck();
     $this->assertTrue(!empty($str));
 }
 /**
  * This method renders the report
  *
  * @return    string    The status report as HTML
  */
 public function getReport()
 {
     $content = '';
     $content .= tx_additionalreports_main::displayWebsitesConf();
     return $content;
 }