Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect templates when using __invoke controllers #980

Closed
ruudk opened this issue Jul 18, 2017 · 2 comments
Closed

Detect templates when using __invoke controllers #980

ruudk opened this issue Jul 18, 2017 · 2 comments
Labels

Comments

@ruudk
Copy link
Contributor

ruudk commented Jul 18, 2017

I'm using controllers that only contain 1 action, called: __invoke.

For example:

<?php

namespace AdminBundle\Controller\Cases;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class ShowCaseController extends BaseController
{
    /**
     * @Route("/cases/show/{id}", name="case_show")
     * @Template
     */
    public function __invoke()
    {
    }
}

The template is located in AdminBundle/Resources/views/Cases/ShowCase.html.twig.

Symfony / SensioFrameworkExtraBundle perfectly pick this up. But this amazing plugin doesn't :(

Whenever I click on @Template it opens the Annotation instead of showing the dropdown with the Twig template.

Haehnchen added a commit that referenced this issue Jul 18, 2017
…me redundant template annotation code
@Haehnchen
Copy link
Owner

now its a little bit more amazing ;)

@ruudk
Copy link
Contributor Author

ruudk commented Jul 18, 2017

You are awesome! Put a small donation in, thanks ✌️

@ruudk ruudk closed this as completed Jul 18, 2017
Haehnchen added a commit that referenced this issue Jul 23, 2017
…fix and in Twig template controller resolver #980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants