Generate backend output if TL_MODE is set to BE

@return string|null Backend output or null
970661
public function rsceGetBackendOutput()
	{
		if (TL_MODE !== 'BE') {
			return null;
		}

		$config = CustomElements::getConfigByType($this->type) ?: array();

		// Handle newsletter output the same way as the frontend
		if (!empty($config['isNewsletter'])) {

			if (\Input::get('do') === 'newsletter') {
				return null;
			}

			foreach(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $entry) {
				$method = $entry['class'] . '::' . $entry['function'];
				if (
					$entry['file'] === TL_ROOT . '/system/modules/newsletter/classes/Newsletter.php'
					|| $entry['file'] === TL_ROOT . '/vendor/contao/newsletter-bundle/src/Resources/contao/classes/Newsletter.php'
					|| $method === 'Contao\\Newsletter::send'
					|| $method === 'tl_newsletter::listNewsletters'
				) {
					return null;
				}
			}

		}

		if (!empty($config['beTemplate'])) {
			$this->strTemplate = $config['beTemplate'];
			return null;
		}

		if (
			in_array($this->type, $GLOBALS['TL_WRAPPERS']['start'])
			|| in_array($this->type, $GLOBALS['TL_WRAPPERS']['stop'])
			|| in_array($this->type, $GLOBALS['TL_WRAPPERS']['separator'])
		) {
			return '';
		}

		return null;
	}
248795
private function getLL()
    {
        if ($this->ll === null) {
            $this->ll = $GLOBALS['LANG']->includeLLFile(
                $this->getExtPath() . 'Resources/Private/Language/' . $this->langFile,
                false
            );
        }

        return $this->ll;
    }
837615
public function getTld() : ?string 
    {
        if ( ! $this->hasTld()) {
            $this->setTld($this->getDefaultTld());
        }
        return $this->tld;
    }
625002
private static function additional_output()
    {
        $backtrace = \debug_backtrace()[3];

        $root = \realpath(__DIR__ . '/../../../../../../');

        return '<span class="sf-dump-lineinfo">' . \ltrim(\str_replace($root, '', $backtrace['file']), '/\\') . ':' . $backtrace['line'] . '</span>';
    }
333696
public function outputMessages()
    {

        // Simple Wrapper for OutputActions::$render->renderMessages
        if (php_sapi_name() === 'cli' &&
            !empty($this->messages)
        ) {
            // Output the messages on the shell.
            $result = "\n\nkreXX messages\n";
            $result .= "==============\n";
            foreach ($this->messages as $message) {
                $result .= "$message\n";
            }

            echo $result . "\n\n";
        }

        // Return the rendered messages.
        return $this->pool->render->renderMessages($this->messages);
    }
211475
public function output() {
		if ( is_array( $this->output ) ) {
			echo '<div class="qm" id="' . esc_attr($this->collector->id()) . '">';
			echo '<table cellspacing="0"><tbody>';
			foreach ( $this->output as &$single ) {
				echo "<tr><td>" . $single . "</td></tr>";
			}
			echo '</tbody></table>';
			echo '</div>';
		}
	}
342777
public function output()
    {
        $defaults = [
            'fontCache' => TMP,
            'tempDir' => TMP,
        ];
        $options = (array)$this->getConfig('options') + $defaults;

        $DomPDF = $this->_createInstance($options);
        $DomPDF->setPaper($this->_Pdf->pageSize(), $this->_Pdf->orientation());
        $DomPDF = $this->_render($this->_Pdf, $DomPDF);

        return $this->_output($DomPDF);
    }
302923
public function output()
    {
        $output = $this->outputType();
        switch ($output) {
            case static::PROPERTY_DISPLAY:
                $type   = $this->displayType();
                $prop   = $this->display();
                $getter = 'displayId';
                $setter = 'setDisplayId';
                break;

            case static::PROPERTY_CONTROL:
                $type   = $this->inputType();
                $prop   = $this->input();
                $getter = 'inputId';
                $setter = 'setInputId';
                break;
        }

        $GLOBALS['widget_template'] = $type;

        if ($this->l10n() && $this->loopL10n()) {
            $locales  = $this->translator()->availableLocales();
            $outputId = $prop->{$getter}();
            foreach ($locales as $langCode) {
                // Set a unique property output ID for each locale.
                $prop->{$setter}($outputId.'_'.$langCode);
                $prop->setLang($langCode);

                yield $prop;
            }

            $GLOBALS['widget_template'] = '';
            $prop->{$setter}($outputId);
        } else {
            yield $prop;

            $GLOBALS['widget_template'] = '';
        }
    }
9775
private function getTwigEnvironment()
    {
        if (null == $this->twigEnvironment) {
            $this->twigEnvironment = $this->createTwigEnvironment();
        }
        return $this->twigEnvironment;
    }
482919
public function render()
    {
        /** @var CommandInterface[] $commands */
        $commands = $this
            ->environment
            ->getDataDefinition()
            ->getDefinition(Contao2BackendViewDefinitionInterface::NAME)
            ->getGlobalCommands()
            ->getCommands();

        if (!\is_array($commands)) {
            $commands = [];
        }

        $buttons = [];
        foreach ($commands as $command) {
            if ($command->isDisabled()) {
                continue;
            }
            $buttons[$command->getName()] = $this->renderButton($command);
        }

        $buttonsEvent = new GetGlobalButtonsEvent($this->environment);
        $buttonsEvent->setButtons($buttons);
        $this->dispatcher->dispatch(GetGlobalButtonsEvent::NAME, $buttonsEvent);

        return '<div id="tl_buttons">' . \implode('', $buttonsEvent->getButtons()) . '</div>';
    }
429470
protected function generateOutput() {
        $flashMessages = [];
        foreach ($this->messages as $messageItem) {
            /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
            $flashMessages[] = GeneralUtility::makeInstance(FlashMessage::class, $messageItem[2], $messageItem[1], $messageItem[0]);
        }

            /** @var $resolver FlashMessageRendererResolver */
        $resolver = GeneralUtility::makeInstance(FlashMessageRendererResolver::class);
        $renderer = $resolver->resolve();
        return $renderer->render($flashMessages);
    }
780783
protected function retrieveOutput()
    {
        if ((! config('eyewitness.capture_cron_output')) || (! file_exists($this->output))) {
            return null;
        }

        $text = file_get_contents($this->output);

        if (str_contains($this->output, 'eyewitness_cron_') && file_exists($this->output)) {
            unlink($this->output);
        }

        return substr($text, 0, 15000);
    }
421310
public function generate()
	{
		if (TL_MODE == 'BE')
		{
			$objTemplate = new \BackendTemplate('be_wildcard');

			$objTemplate->wildcard = '### DOCUMENT MANAGEMENT SYSTEM - LISTING ###';
			$objTemplate->title = $this->headline;
			$objTemplate->id = $this->id;
			$objTemplate->link = $this->name;
			$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;

			return $objTemplate->parse();
		}

		return parent::generate();
	}
560699
protected function isOutputHtml()
    {
        static $result;

        if ($result !== null) {
            return $result;
        }

        if ($this->pool->config->getSetting(Fallback::SETTING_DETECT_AJAX) === Fallback::VALUE_FALSE) {
            // We ignore the heades and send everything.
            $result = true;
        }

        // When we have dispatched a PDF or Json, the browser will not be
        // able to render the HTML output correctly.
        foreach (headers_list() as $header) {
            $header = strtolower($header);
            if (strpos($header, 'content-type') !== false &&
                strpos($header, 'html') === false
            ) {
                // We do have none html content type.
                $result = false;
            }
        }

        // Found nothing, must be HTML.
        return $result = true;
    }
656000
public function getBackendDisplayMode(): string
    {
        $backendDisplayMode = $this->get('backendDisplayMode');
        $validModes = ['current', 'childs', 'both'];
        if (!\in_array($backendDisplayMode, $validModes, true)) {
            $backendDisplayMode = 'current';
        }

        return $backendDisplayMode;
    }
34328
public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
227768
public function generateDocumentation()
    {
        if ($this->documentation !== null) {
            $this->documentation->setIndentationString($this->getIndentationString());
            $this->documentation->setIndentationLevel($this->getIndentationLevel());

            return $this->documentation->generate();
        } else {
            return null;
        }
    }