mw/tag-admin-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Bundle that combines the FPNTagBundle together with the SonataAdminBundle.

Installs: 2 833

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 2

Open Issues: 1

Type:symfony-bundle

dev-master 2012-08-08 19:46 UTC

This package is not auto-updated.

Last update: 2023-11-25 10:04:51 UTC


README

The goal of this bundle is to make it easy to use the FPNTagBundle together with the SonataAdminBundle.

In your entities:

class ... implements \DoctrineExtensions\Taggable\Taggable
{
    use \MW\Bundle\TagAdminBundle\Entity\Traits\Taggable;
    ...
}

In your admin classes:

class ...Admin extends Admin
{
    use \MW\Bundle\TagAdminBundle\Admin\Traits\TagHandler;

    ...

    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ...
            ->add('tags_plain', 'textarea', array('required' => false))
            ->end()
            ;
        }
    }
    ...
}

In your service definitions:

<service id="..." class="...">
    <tag name="sonata.admin" manager_type="..." group="..." label="..."/>
    <argument />
    <argument>...</argument>
    <argument>...</argument>
    <call method="setTagTransformer">
        <argument type="service" id="mw.text_to_tag_transformer" />
    </call>
</service>