installation.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Installation
  2. ============
  3. To begin, add the dependent bundles to the ``src/Bundle`` directory. If using
  4. git, you can add them as submodules::
  5. git submodule add git@github.com:sonata-project/jQueryBundle.git src/Bundle/jQueryBundle
  6. git submodule add git@github.com:sonata-project/BaseApplicationBundle.git src/Bundle/BaseApplicationBundle
  7. Next, be sure to enable the bundles in your application kernel:
  8. .. code-block:: php
  9. // app/AppKernel.php
  10. public function registerBundles()
  11. {
  12. return array(
  13. // ...
  14. new Bundle\jQueryBundle\jQueryBundle(),
  15. new Bundle\BluePrintBundle\BluePrintBundle(),
  16. new Bundle\BaseApplicationBundle\BaseApplicationBundle(),
  17. // ...
  18. );
  19. }
  20. Configuration
  21. -------------
  22. To use the ``BaseApplicationBundle``, add the following to your application
  23. configuration file.
  24. .. code-block:: yaml
  25. # app/config/config.yml
  26. base_application.config: ~
  27. The bundle also contains several routes. Import them by adding the following
  28. code to your application's routing file:
  29. - Add the BaseApplicationBundle's routing definition
  30. .. code-block:: yaml
  31. # app/config/routing.yml
  32. base_application:
  33. resource: BaseApplicationBundle/Resources/config/routing/base_application.xml
  34. prefix: /admin
  35. At this point you can access to the dashboard with the url: ``http://yoursite.local/admin/dashboard``.
  36. .. note::
  37. If you're using XML or PHP to specify your application's configuration,
  38. the above configuration and routing will actually be placed in those
  39. files, with the correct format (i.e. XML or PHP).