APY / APYDataGridBundle

Symfony Datagrid Bundle
MIT License
492 stars 344 forks source link

Is it possible to change groupConcat separator through annotions? #1035

Closed vialcollet closed 4 years ago

vialcollet commented 5 years ago

I would like to have <br> instead of , as separator. I can handle through the manipulateRenderCell but I would like to know if it possible to do it in annotations.

Thanks in advance

/**
 * Dropdowns
 *
 * @ORM\Table(name="dropdowns")
 * @ORM\Entity(repositoryClass="cwt\psmdbBundle\Repository\DropdownsRepository")
 * @GRID\Source(groupBy={"id"})
 */
class Dropdowns
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @GRID\Column(align="left")
     */
    private $id;

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

    /**
     * @ORM\OneToMany(targetEntity="cwt\psmdbBundle\Entity\DropdownsItems", mappedBy="dropdown", cascade={"all"}, orphanRemoval=true)
     * @GRID\Column(field="dropdownItems.name:group_concat:{.}", title="Items")
     */
    private $dropdownItems;
npotier commented 4 years ago

Hello,

As far a I know, it's not possible to do so. As you said, there is a workaround by using manipulateRenderCell to get what you want.

I'm closing this issue. Feel free to re-open it if you think this feature must be implemented