The Third Party Bundles
The Third Party Bundles¶
You're still here? You already learned the basics of the Symfony CMF and you just wanted to learn more and more? Then you can read this chapter! This chapter will walk you quickly through some other CMF bundles. Most of the other bundles are based on the shoulders of some giants, like the KnpMenuBundle or SonataBlockBundle.
We have explained you that the CMF is based on a database, in order to make it editable by an admin without changing the code. But we haven't told you how that admin will be able to maintain the website. Now it's time to reveal how to do that: Using the SonataAdminBundle. All the CMF bundles that define editable elements also provide integration to make those elements editable in Sonata Admin.
By default, all Admin classes in the CMF bundles will be activated when the SonataDoctrinePHPCRAdminBundle is installed. You can switch off the Admin class in the configuration. For instance, to disable the MenuBundle Admin classes, you would do:
1 2 3 4 5
# app/config/config.yml cmf_menu: persistence: phpcr: use_sonata_admin: false
You can also disable/enable all CMF Admin classes by configuring this on the
1 2 3 4 5
# app/config/config.yml cmf_core: persistence: phpcr: use_sonata_admin: false
When the Admin classes are activated, the admin can go to
/admin (if you
installed the SonataAdminBundle correctly) and find the well-known admin
dashboard with all they need:
As you can see on the left, the admin uses the TreeBrowserBundle to display a live admin tree, where the admin can click on the nodes to edit, remove or move them.
You made it! Let's summarize what you've learned in the Quick Tour:
- The Symfony CMF is build for highly customized Content Management Systems;
- The Symfony CMF team creates bundles with a specific CMS feature, which can be used both together and standalone;
- The Symfony CMF uses the database in order to make a lot of things editable by an Admin, however the configuration is kept in the filesystem to keep deployments simple and support version control;
- The PHP Content Repository (PHPCR) is a great database build for CMS systems, but you can use any other storage system for the Symfony CMF too;
- Instead of binding controllers to routes, the routes are bound to content objects.
- The Symfony CMF took care not to reinvent the wheel. That resulted in a lot of bundles integrating commonly known Symfony2 bundles.
I can't tell you more about the architecture and bundles of the Symfony CMF, but there is much much more to explore. Take a look at the book and get started with your first project using the Symfony CMF!
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.