Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.36 KB

04-create-grid.md

File metadata and controls

61 lines (45 loc) · 1.36 KB

Create grid

Topics

  • OroDatagridBundle
  • controllers
  • routing and OroDistributionBundle
  • Twig templates
  • translations
  • DIC

Changes

src/Acme/Bundle/TaskBundle
    Controller
        TaskController (created)
    DependencyInjection
        AcmeTaskExtension (updated)
    Resources
        config
            oro
                routing.yml (created)
            datagrid.yml (created)
            services.yml (created)
        translations
            messages.en.yml (created)
        views
            Task
                index.html.twig (created)
    Tests
        Unit
            DependencyInjection
                AcmeTaskExtensionTest (updated)

Add grid

  1. Add grid config Acme/Bundle/TaskBundle/Resources/config/datagrid.yml

  2. Add translations src/Acme/src/Acme/Bundle/TaskBundle/Resources/translations/messages.en.yml

  3. Add parameter of task class src/Acme/src/Acme/Bundle/TaskBundle/Resources/config/services.yml

  4. Update Acme\Bundle\TaskBundle\DependencyInjection\AcmeTaskExtension

  • add $loader->load('services.yml');
  1. Add controller class Acme\Bundle\TaskBundle\Controller\TaskController

  2. Add Acme/Bundle/TaskBundle/Resources/config/oro/routing.yml

  3. Add template Acme/Bundle/TaskBundle/Resources/views/Task/index.html.twig

  4. Clear cache

app/console cache:clear
  1. Go to http://orocrm-training.local/app_dev.php/acme/task