diff --git a/app/AppKernel.php b/app/AppKernel.php
index c5c9eb6b2f..61dfcaf87f 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -8,6 +8,7 @@ class AppKernel extends Kernel
public function registerBundles()
{
$bundles = array(
+ // Symfony Standard Edition Bundles
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
@@ -16,6 +17,19 @@ public function registerBundles()
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
+
+ // Symfony CMF Standard Edition Bundles
+ new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),
+ new Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle(),
+ new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
+ new Symfony\Cmf\Bundle\SimpleCmsBundle\CmfSimpleCmsBundle(),
+
+ new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(),
+ new Knp\Bundle\MenuBundle\KnpMenuBundle(),
+
+ new Symfony\Cmf\Bundle\CreateBundle\CmfCreateBundle(),
+ new FOS\RestBundle\FOSRestBundle(),
+ new JMS\SerializerBundle\JMSSerializerBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
diff --git a/app/app.sqlite b/app/app.sqlite
new file mode 100644
index 0000000000..21e73f898c
Binary files /dev/null and b/app/app.sqlite differ
diff --git a/app/config/config.yml b/app/config/config.yml
index fcfde1a6ee..ccd4f2b09c 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -42,23 +42,43 @@ assetic:
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
-# Doctrine Configuration
+# Doctrine Configuration (needed for Jackalope Doctrine DBAL)
doctrine:
dbal:
driver: "%database_driver%"
- host: "%database_host%"
- port: "%database_port%"
- dbname: "%database_name%"
- user: "%database_user%"
- password: "%database_password%"
charset: UTF8
- # if using pdo_sqlite as your database driver, add the path in parameters.yml
- # e.g. database_path: "%kernel.root_dir%/data/data.db3"
- # path: "%database_path%"
+ path: "%database_path%"
+ # if using something else than pdo_sqlite as driver, add the
+ # parameters in parameters.yml.dist and uncomment the lines below
+ #host: "%database_host%"
+ #port: "%database_port%"
+ #dbname: "%database_name%"
+ #user: "%database_user%"
+ #password: "%database_password%"
- orm:
- auto_generate_proxy_classes: "%kernel.debug%"
+# Doctrine PHPCR-ODM configuration
+doctrine_phpcr:
+ session:
+ backend: "%phpcr_backend%"
+ workspace: "%phpcr_workspace%"
+ username: "%phpcr_user%"
+ password: "%phpcr_password%"
+ odm:
auto_mapping: true
+ auto_generate_proxy_classes: "%kernel.debug%"
+
+# Cmf Configuration
+cmf_core:
+ persistence:
+ phpcr: true
+ # if you want another basepath
+ # basepath: /custom/basepath
+ publish_workflow: false
+
+cmf_simple_cms:
+ routing:
+ templates_by_class:
+ Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page: AcmeDemoBundle:Page:index.html.twig
# Swiftmailer Configuration
swiftmailer:
diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml
index 914c34ae22..a724592dff 100644
--- a/app/config/config_dev.yml
+++ b/app/config/config_dev.yml
@@ -17,9 +17,6 @@ monolog:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
- console:
- type: console
- bubble: false
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml
index 342837a031..a835d60a3a 100644
--- a/app/config/config_prod.yml
+++ b/app/config/config_prod.yml
@@ -21,5 +21,3 @@ monolog:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
- console:
- type: console
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 8b317c27d2..fb754d5099 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -1,10 +1,14 @@
parameters:
database_driver: pdo_mysql
- database_host: 127.0.0.1
- database_port: ~
- database_name: symfony
- database_user: root
- database_password: ~
+ database_path: "%kernel.root_dir%/app.sqlite"
+
+ phpcr_backend:
+ # use Jackalope Doctrine DBAL
+ type: doctrinedbal
+ connection: default
+ phpcr_workspace: default
+ phpcr_user: admin
+ phpcr_password: admin
mailer_transport: smtp
mailer_host: 127.0.0.1
diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml
index c45f361bdb..ff93a02ba0 100644
--- a/app/config/routing_dev.yml
+++ b/app/config/routing_dev.yml
@@ -12,7 +12,3 @@ _configurator:
_main:
resource: routing.yml
-
-# AcmeDemoBundle routes (to be removed)
-_acme_demo:
- resource: "@AcmeDemoBundle/Resources/config/routing.yml"
diff --git a/composer.json b/composer.json
index dad465b151..96340799f8 100644
--- a/composer.json
+++ b/composer.json
@@ -1,25 +1,31 @@
{
- "name": "symfony/framework-standard-edition",
+ "name": "symfony-cmf/standard-edition",
"license": "MIT",
"type": "project",
- "description": "The \"Symfony Standard Edition\" distribution",
+ "description": "The \"Symfony CMF Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
- "symfony/symfony": "~2.4",
- "doctrine/orm": "~2.2,>=2.2.3",
- "doctrine/doctrine-bundle": "~1.2",
- "twig/extensions": "~1.0",
- "symfony/assetic-bundle": "~2.3",
- "symfony/swiftmailer-bundle": "~2.3",
- "symfony/monolog-bundle": "~2.4",
- "sensio/distribution-bundle": "~2.3",
- "sensio/framework-extra-bundle": "~3.0",
- "sensio/generator-bundle": "~2.3",
- "incenteev/composer-parameter-handler": "~2.0"
+ "symfony/symfony": "2.3.*",
+ "jackalope/jackalope-doctrine-dbal": "1.1.*",
+ "doctrine/doctrine-bundle": "1.2.*",
+ "doctrine/data-fixtures": "1.0.*",
+ "twig/extensions": "1.0.*",
+ "symfony/assetic-bundle": "2.3.*",
+ "symfony/swiftmailer-bundle": "2.3.*",
+ "symfony/monolog-bundle": "2.3.*",
+ "symfony-cmf/symfony-cmf": "1.1.*",
+ "symfony-cmf/simple-cms-bundle": "1.1.*",
+ "symfony-cmf/create-bundle": "1.1.*",
+ "sensio/distribution-bundle": "2.3.*",
+ "sensio/framework-extra-bundle": "2.3.*",
+ "sensio/generator-bundle": "2.3.*",
+ "incenteev/composer-parameter-handler": "~2.0",
+ "nelmio/alice": "1.*"
},
+ "minimum-stability": "dev",
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
@@ -46,7 +52,7 @@
"file": "app/config/parameters.yml"
},
"branch-alias": {
- "dev-master": "2.4-dev"
+ "dev-master": "1.1-dev"
}
}
}
diff --git a/src/Acme/DemoBundle/Command/HelloWorldCommand.php b/src/Acme/DemoBundle/Command/HelloWorldCommand.php
deleted file mode 100644
index 998cbcdf24..0000000000
--- a/src/Acme/DemoBundle/Command/HelloWorldCommand.php
+++ /dev/null
@@ -1,48 +0,0 @@
-getContainer().
- *
- * @author Tobias Schultze {{ cmfMainContent.body }}
- Choose between two default users: user/userpass (ROLE_USER) or admin/adminpass (ROLE_ADMIN)
- Congratulations! You have successfully installed a new Symfony application.Hello {{ name }}!
-{% endblock %}
-
-{% set code = code(_self) %}
diff --git a/src/Acme/DemoBundle/Resources/views/Demo/index.html.twig b/src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
deleted file mode 100644
index 454a3203e4..0000000000
--- a/src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "AcmeDemoBundle::layout.html.twig" %}
-
-{% block title "Symfony - Demos" %}
-
-{% block content_header '' %}
-
-{% block content %}
- Available demos
-
-
-{% endblock %}
diff --git a/src/Acme/DemoBundle/Resources/views/Page/index.html.twig b/src/Acme/DemoBundle/Resources/views/Page/index.html.twig
new file mode 100644
index 0000000000..58a26f68e4
--- /dev/null
+++ b/src/Acme/DemoBundle/Resources/views/Page/index.html.twig
@@ -0,0 +1,3 @@
+{{ cmfMainContent.title }}
+
+Hello {{ name }}!
-
- Hello resource secured for admin only.
-{% endblock %}
-
-{% set code = code(_self) %}
diff --git a/src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig b/src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
deleted file mode 100644
index 4e3649f77a..0000000000
--- a/src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "AcmeDemoBundle:Secured:layout.html.twig" %}
-
-{% block title "Hello " ~ name %}
-
-{% block content %}
- Hello {{ name }} secured for Admins only!
-{% endblock %}
-
-{% set code = code(_self) %}
diff --git a/src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig b/src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
deleted file mode 100644
index aeea55c5cf..0000000000
--- a/src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
+++ /dev/null
@@ -1,6 +0,0 @@
-{% extends "AcmeDemoBundle::layout.html.twig" %}
-
-{% block content_header_more %}
- {{ parent() }}
- Login
-
- Welcome!
-
-
-
-
-
-
-
-
- Code behind this page
-
$controller- -
Template Code
-$template-EOF; - } - - protected function getControllerCode() - { - $class = get_class($this->controller[0]); - if (class_exists('CG\Core\ClassUtils')) { - $class = ClassUtils::getUserClass($class); - } - - $r = new \ReflectionClass($class); - $m = $r->getMethod($this->controller[1]); - - $code = file($r->getFilename()); - - return ' '.$m->getDocComment()."\n".implode('', array_slice($code, $m->getStartline() - 1, $m->getEndLine() - $m->getStartline() + 1)); - } - - protected function getTemplateCode($template) - { - return $this->loader->getSource($template->getTemplateName()); - } - - /** - * Returns the name of the extension. - * - * @return string The extension name - */ - public function getName() - { - return 'demo'; - } -}