Integration of the Symfony full-stack framework into TYPO3 CMS
<?php
require_once PATH_site.'fileadmin/app/AppKernel.php';
use TYPO3\CMS\Core\Utility\GeneralUtility;
$context = GeneralUtility::getApplicationContext();
$kernel = new AppKernel((string)$context, $context->isDevelopment());
$kernel->boot();
<?php
use Bartacus\Bundle\BartacusBundle\Typo3\Plugin;
/**
* text element plugin
*/
class tx_content_text extends Plugin {
/**
* Execute the plugin, e.g. retrieve data, render it's content..
*
* @return string The content that is displayed on the website
*/
protected function execute() {
return $this->render('PixelartContent:Text:text.html.twig', $this->cObj->data);
}
}
<?php
// typo3conf/ext/content/Classes/PixelartContent.php
namespace Pixelart\Extensions\Content;
use Bartacus\Bundle\Bartacus\Typo3\Typo3Extension;
/**
* Transforms this extension to a "symfony bundle"
*
* @author Patrik Karisch <p.karisch@pixelart.at>
*/
class PixelartContent extends Typo3Extension {
}
$ composer create-project --dev bartacus/bartacus-standard myproject 0.1.x-dev