Classes/ExtMgm/Statefield.php
public function main()
    {
        $buffer = '';
        $registry = GeneralUtility::makeInstance('KayStrobach\Dyncss\Configuration\BeRegistry');
        $handlers = $registry->getAllFileHandler();
        if (count($handlers)) {
            foreach ($handlers as $extension => $class) {
                /** @var AbstractParser $parser */
                $parser = new $class();
                $buffer .= '<tr><td>*.'.$extension.'</td>';
                $buffer .= '<td>'.$class.'</td>';
                $buffer .= '<td><a href="'.$parser->getParserHomepage().'" target="_blank">'.$parser->getParserName().'</a></td>';
                $buffer .= '<td>'.$parser->getVersion().'</td>';
                $buffer .= '</tr>';
            }
            /** @var FlashMessage $flashMessage */
            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Congrats, you have '.count($handlers).' handlers registered.',
                '',
                FlashMessage::OK,
                true
            );
            $this->addFlashMessage($flashMessage);
            $buffer = '<table class="t3-table table"><thead><tr><th>extension</th><th>class</th><th>name</th><th>version</th></tr></thead>'.$buffer.'</table>';
        } else {
            /** @var FlashMessage $flashMessage */
            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Please install one of the dyncss_* extensions',
                'No handler registered! - No dynamic css is handled at all ;/',
                FlashMessage::WARNING,
                true
            );
            $this->addFlashMessage($flashMessage);
            return $this->renderFlashMessage();
        }
        $renderedFlashMessages = $this->renderFlashMessage();
        return $renderedFlashMessages . $buffer;
    }
public function main()
    {
        $buffer = '';
        $registry = GeneralUtility::makeInstance('KayStrobach\Dyncss\Configuration\BeRegistry');
        $handlers = $registry->getAllFileHandler();
        if (count($handlers)) {
            foreach ($handlers as $extension => $class) {
                /** @var AbstractParser $parser */
                $parser = new $class();
                $buffer .= '<tr><td>*.'.$extension.'</td>';
                $buffer .= '<td>'.$class.'</td>';
                $buffer .= '<td><a href="'.$parser->getParserHomepage().'" target="_blank">'.$parser->getParserName().'</a></td>';
                $buffer .= '<td>'.$parser->getVersion().'</td>';
                $buffer .= '</tr>';
            }
            /** @var FlashMessage $flashMessage */
            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Congrats, you have '.count($handlers).' handlers registered.',
                '',
                FlashMessage::OK,
                true
            );
            $this->addFlashMessage($flashMessage);
            $buffer = '<table class="t3-table table"><thead><tr><th>extension</th><th>class</th><th>name</th><th>version</th></tr></thead>'.$buffer.'</table>';
        } else {
            /** @var FlashMessage $flashMessage */
            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Please install one of the dyncss_* extensions',
                'No handler registered! - No dynamic css is handled at all ;/',
                FlashMessage::WARNING,
                true
            );
            $this->addFlashMessage($flashMessage);
            return $this->renderFlashMessage();
        }
        $renderedFlashMessages = $this->renderFlashMessage();
        return $renderedFlashMessages . $buffer;
    }
public function main ( ) { $ buffer = '' ; $ registry = GeneralUtility :: makeInstance ( 'KayStrobach\Dyncss\Configuration\BeRegistry' ) ; $ handlers = $ registry -> getAllFileHandler ( ) ; if ( count ( $ handlers ) ) { foreach ( $ handlers as $ extension => $ class ) { /** @var AbstractParser $parser */ $ parser = new $ class ( ) ; $ buffer .= '<tr><td>*.' . $ extension . '</td>' ; $ buffer .= '<td>' . $ class . '</td>' ; $ buffer .= '<td><a href="' . $ parser -> getParserHomepage ( ) . '" target="_blank">' . $ parser -> getParserName ( ) . '</a></td>' ; $ buffer .= '<td>' . $ parser -> getVersion ( ) . '</td>' ; $ buffer .= '</tr>' ; } /** @var FlashMessage $flashMessage */ $ flashMessage = GeneralUtility :: makeInstance ( FlashMessage :: class , 'Congrats, you have ' . count ( $ handlers ) . ' handlers registered.' , '' , FlashMessage :: OK , true ) ; $ this -> addFlashMessage ( $ flashMessage ) ; $ buffer = '<table class="t3-table table"><thead><tr><th>extension</th><th>class</th><th>name</th><th>version</th></tr></thead>' . $ buffer . '</table>' ; } else { /** @var FlashMessage $flashMessage */ $ flashMessage = GeneralUtility :: makeInstance ( FlashMessage :: class , 'Please install one of the dyncss_* extensions' , 'No handler registered! - No dynamic css is handled at all ;/' , FlashMessage :: WARNING , true ) ; $ this -> addFlashMessage ( $ flashMessage ) ; return $ this -> renderFlashMessage ( ) ; } $ renderedFlashMessages = $ this -> renderFlashMessage ( ) ; return $ renderedFlashMessages . $ buffer ; }
Render state field
Render state field