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

[Twig] No autocomplete in nested for-loop #576

Closed
riley-van-hengstum opened this issue Sep 3, 2015 · 1 comment
Closed

[Twig] No autocomplete in nested for-loop #576

riley-van-hengstum opened this issue Sep 3, 2015 · 1 comment
Labels

Comments

@riley-van-hengstum
Copy link

{% for application in applications %}
    {% for variant in application.variants %}
        <a href="{{ path('_variant', { 'id': variant.id }) }}" class="card-link">{{ variant.name }}</a>
    {% endfor %}
{% endfor %}

Autocomplete is working for the outer loop (application), but not for the inner loop (variant).

Also:

{{ applications[0].name }}

doesn't autocomplete after applications[0], don't know if there is a relation with the first issue.

Using plugin version 0.11.96 and IDEA 14.1.4 with PHP plugin 141.1534.

Using the following entity class:

namespace ApiBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Application
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Application
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="api_key", type="string", length=64)
     */
    private $apiKey;

    /**
     * @var Variant[]
     *
     * @ORM\OneToMany(targetEntity="Variant", mappedBy="application")
     */
    private $variants;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Application
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set apiKey
     *
     * @param string $apiKey
     * @return Application
     */
    public function setApiKey($apiKey)
    {
        $this->apiKey = $apiKey;

        return $this;
    }

    /**
     * Get apiKey
     *
     * @return string 
     */
    public function getApiKey()
    {
        return $this->apiKey;
    }

    /**
     * @return Variant[]
     */
    public function getVariants()
    {
        return $this->variants;
    }

    /**
     * @param Variant[] $variants
     * @return $this
     */
    public function setVariants(array $variants)
    {
        $this->variants = $variants;
        return $this;
    }
}
@Koc
Copy link
Contributor

Koc commented Dec 18, 2017

ref #1035

@riley-van-hengstum riley-van-hengstum closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
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

3 participants