BackBee is a next generation content manager built on top of Doctrine and Symfony components. Together, let's see how we use and extends this components to provide to our users a software with CMS features and a great CMF capacities.
1/3 Backee is a Symfony Application $application = new \BackBee\Standard\Application(null, ‘default’); BackBee use environments and application contexts. Each BackBee Bundle can load his configuration
3/3 new \BackBee\Standard\Application('preprod'); Like in Symfony framework, the configuration are merged « on cascade » vendor/backbee/backbee/Config/config.yml repository/Config/config.yml repository/Config/preprod/config.yml
1/2 A FrontController is in charge of return a Response from a Request. class FrontController implements Symfony\Component\HttpKernel\HttpKernelInterface { /* main request handler */ public function handle(Request $request = null,$type = self::MASTER_REQUEST, $catch = true) /* handles the request when none other action was found. */ public function defaultAction($uri = null, $sendResponse = true) /* specific request handlers */ public function rssAction($uri = null) public function rpcAction() }
2/2 A RestController is in charge of return an API JsonResponse. abstract class AbstractRestController extends BackBee\Controller\Controller\Controller implements RestControllerInterface, FormatterInterface { // Default formatter for a object(s) public function formatCollection($collection, $format = 'json|jsonp') public function formatItem($item, $format = 'json') // Deserialize data into Doctrine entity. public function deserializeEntity(array $data, $entityOrClass) // Create a Symfony JsonResponse. protected function createJsonResponse($data = null, $status = 200, $headers = array()) }
is very extensible and powerful thanks to « services » ~150 services, to manage Security, Doctrine, « Page Workflow » … Each Bundle can register services and commands
We build Pages, based on Layouts and Contents; Each content in BackBee is at least an AbstractClassContent instance; The PageBuilder service is very extensible;
from phpcr.github.com All content is stored as a tree of Nodes; A Node has named Properties with values; Values can be scalar, file data or references to other nodes;
No effect on the cache, without updating the database. # /Users/Mickael/projects/MyApp/repository/ClassContent/article.yml article: extends: BackBee\ClassContent\Breve traits: [BackBee\Traits\MyTrait] properties: name: Article description: | "An article contains a title, a main image and a customisable body" category: [article] elements: title: BackBee\ClassContent\Element\text image: BackBee\ClassContent\Media\image body: BackBee\ClassContent\article\paragraph