Created
May 30, 2014 13:57
-
-
Save djoo/30fee36463753c25c822 to your computer and use it in GitHub Desktop.
Override content view embed link in eZ Publish 5
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
<?php | |
/** | |
* File containing the FooterController class. | |
* | |
* @copyright Copyright (C) 1999-2014 eZ Systems AS. All rights reserved. | |
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 | |
* @version //autogentag// | |
*/ | |
namespace Djoo\DesignBundle\Controller; | |
use eZ\Bundle\EzPublishCoreBundle\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use eZ\Publish\API\Repository\Values\Content\Query; | |
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalAnd; | |
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; | |
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\ParentLocationId; | |
use eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter; | |
use Pagerfanta\Pagerfanta; | |
class ContentViewEmbedController extends Controller | |
{ | |
public function linkAction() | |
{ | |
exit("link"); | |
} | |
} |
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
system: | |
ezdemo_site_clean_group: | |
content_view: | |
embed: | |
link: | |
template: "DjooDesignBundle:content/link:embed.html.twig" | |
controller: "DjooDesignBundle:ContentViewEmbed:link" | |
match: | |
Identifier\ContentType: [link] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Johann, it's a very nice trick, but I can't understand why it is not working for me. The controller is never called. Is this thing implemented only since eZ Publish 5.4?