forked from picoss/SonataExtraAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
141 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the YesWeHack BugBounty backend | ||
* | ||
* (c) Romain Honel <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
/** | ||
* Class EntityRouterCompilerPass | ||
* | ||
* @author Romain Honel <[email protected]> | ||
*/ | ||
class EntityRouterCompilerPass implements CompilerPassInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
foreach ($container->findTaggedServiceIds('sonata.admin') as $id => $attributes) { | ||
$definition = $container->getDefinition($id); | ||
$definition->addMethodCall('setRouteBuilder', array(new Reference('picoss.sonataextraadmin.route.entity'))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the YesWeHack BugBounty backend | ||
* | ||
* (c) Romain Honel <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Picoss\SonataExtraAdminBundle; | ||
|
||
use Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler\AddAuditEntityCompilerPass; | ||
use Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler\AddTrashEntityCompilerPass; | ||
use Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler\EntityRouterCompilerPass; | ||
use Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler\FormPass; | ||
use Picoss\SonataExtraAdminBundle\DependencyInjection\Compiler\SonataTemplatesPass; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
/** | ||
* Class PicossSonataExtraAdminBundle | ||
* | ||
* @author Romain Honel <[email protected]> | ||
*/ | ||
class PicossSonataExtraAdminBundle extends Bundle | ||
{ | ||
/** | ||
|
@@ -19,11 +34,8 @@ public function build(ContainerBuilder $container) | |
parent::build($container); | ||
|
||
$container->addCompilerPass(new SonataTemplatesPass()); | ||
|
||
$bundles = $container->getParameter('kernel.bundles'); | ||
if (isset($bundles['SonataDoctrineORMAdminBundle'])) { | ||
$container->addCompilerPass(new AddAuditEntityCompilerPass()); | ||
$container->addCompilerPass(new AddTrashEntityCompilerPass()); | ||
} | ||
$container->addCompilerPass(new AddAuditEntityCompilerPass()); | ||
$container->addCompilerPass(new AddTrashEntityCompilerPass()); | ||
$container->addCompilerPass(new EntityRouterCompilerPass()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="picoss.sonata.extra.admin.audit.orm.reader" class="Picoss\SonataExtraAdminBundle\Model\AuditReader" public="true"> | ||
<argument type="service" id="doctrine.orm.entity_manager" /> | ||
<argument type="service" id="stof_doctrine_extensions.listener.loggable" /> | ||
</service> | ||
</services> | ||
</container> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<parameters> | ||
<parameter key="picoss.sonataextraadmin.handler.sortable.class">Picoss\SonataExtraAdminBundle\Handler\SortableHandler</parameter> | ||
</parameters> | ||
<services> | ||
<service id="picoss.sonataextraadmin.handler.sortable" class="%picoss.sonataextraadmin.handler.sortable.class%"> | ||
<argument type="service" id="doctrine.orm.entity_manager"/> | ||
</service> | ||
<service id="%picoss.sonataextraadmin.handler.sortable.class%" alias="picoss.sonataextraadmin.handler.sortable" /> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="Picoss\SonataExtraAdminBundle\Model\TrashManager" alias="picoss.sonataextraadmin.trash.manager" /> | ||
<service id="picoss.sonata.extra.admin.trash.orm.reader" class="Picoss\SonataExtraAdminBundle\Model\TrashReader" public="true"> | ||
<argument type="service" id="doctrine.orm.entity_manager" /> | ||
<argument type="service" id="stof_doctrine_extensions.listener.softdeleteable" /> | ||
</service> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters