Hi Freunde,
ich setze mich gerade damit auseinander, ein paar Änderungen an Contao (managed-edition) vorzunehmen. Ich möchte beispielsweise eigene insertTags erstellen o.ä.
Nun scheitere ich aber schon an dem initialen Anlegen des AppBundles; ich möchte lokal, nur für dieses eine Projekt Änderungen vornehmen (also kein Bundle auf Packagist o.ä.)
Ich habe nun folgendes getan:
app/ContaoManagerPlugin.php
PHP-Code:
<?php
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
class ContaoManagerPlugin implements BundlePluginInterface
{
/**
* {@inheritdoc}
*/
public function getBundles(ParserInterface $parser)
{
return [
BundleConfig::create(AppBundle\AppBundle::class)
->setLoadAfter([ContaoCoreBundle::class])
];
}
}
src/AppBundle/Ressources/contao/config/config.php
PHP-Code:
<?php
$GLOBALS['TEST']= 'TEST';
(wollte hier testen, ob überhaupt irgendwas funktioniert; $GLOBALS['TEST']= 'TEST'; und versucht im Frontend auszugeben, geht aber nicht :/)
src/AppBundle/AppBundle.php
PHP-Code:
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}
composer.json
PHP-Code:
{
"name": "contao/managed-edition",
"type": "project",
"description": "Contao Open Source CMS",
"license": "LGPL-3.0+",
"authors": [
{
"name": "Leo Feyer",
"homepage": "https://github.com/leofeyer"
}
],
"require": {
"php": "^5.6|^7.0",
"contao/calendar-bundle": "^4.4",
"contao/comments-bundle": "^4.4",
"contao/faq-bundle": "^4.4",
"contao/listing-bundle": "^4.4",
"contao/manager-bundle": "4.4.*",
"contao/news-bundle": "^4.4",
"contao/newsletter-bundle": "^4.4",
"delahaye/dlh_googlemaps": "^2.3",
"derhaeuptling/contao-seo-serp-preview": "^3.0",
"do-while/contao-backupdb-bundle": "^1.2",
"jrgregory/m17-sticky-backend-footer": "^2.0",
"madeyourday/contao-rocksolid-custom-elements": "^2.2",
"terminal42/contao-ajaxform": "^1.0",
"terminal42/contao-easy_themes": "^2.2",
"terminal42/contao-folderpage": "^2.0",
"terminal42/contao-inserttags": "^1.9",
"terminal42/notification_center": "^1.4"
},
"conflict": {
"contao/core-bundle": "<4.4.1"
},
"config": {
"component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
],
"post-update-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
]
},
"autoload": {
"psr-4": { "AppBundle\\": "src/AppBundle/" },
"classmap": ["app/ContaoManagerPlugin.php"]
}
}
danach composer update / install / dump-autoload
Geht leider alles nicht. Ich bin noch totaler Anfänger; mag mir jemand helfen? Danke.
Lesezeichen