Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #54 from symfony-cmf/remove_demo
Browse files Browse the repository at this point in the history
Removed the AcmeDemoBundle
  • Loading branch information
dbu committed Mar 25, 2016
2 parents f5de91f + 831f7b2 commit d720441
Show file tree
Hide file tree
Showing 34 changed files with 206 additions and 594 deletions.
3 changes: 0 additions & 3 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public function registerBundles()

// Application bundles
new AppBundle\AppBundle(),

// Remove this Bundle when using the SE as the basis for a new project
new Acme\DemoBundle\AcmeDemoBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
Expand Down
16 changes: 6 additions & 10 deletions app/Resources/views/default/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<div id="wrapper">
<div id="container">
<div id="welcome">
<h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1>
<h1><small>Welcome to</small> Symfony CMF 1.3</h1>
</div>

<div id="status">
<p>
<svg id="icon-status" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z" fill="#759E1A"/></svg>

Your application is ready to start working on it at:
<code>{{ base_dir }}/</code>
Your application is ready to start working on it at:<br>
<code>{{ base_dir }}</code>
</p>
</div>

Expand All @@ -35,10 +35,7 @@
c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/>
</svg>

Read Symfony documentation to learn
<a href="http://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/book/page_creation.html">
How to create your first page in Symfony
</a>
Read documentation to <a href="http://symfony.com/doc/master/cmf/quick_tour/the_big_picture.html">get started with the Symfony CMF</a>!
</p>
</div>

Expand All @@ -56,17 +53,16 @@
a { color: #0000F0; }
a:hover { text-decoration: none; }
code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; }
#wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; }
#wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12); }
#container { padding: 2em; }
#welcome, #status { margin-bottom: 2em; }
#welcome h1 span { display: block; font-size: 75%; }
#welcome h1 small { display: block; font-size: 75%; }
#icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; }
#icon-book { display: none; }
@media (min-width: 768px) {
#wrapper { width: 80%; margin: 2em auto; }
#icon-book { display: inline-block; }
#status a, #next a { display: block; }
@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
Expand Down
12 changes: 12 additions & 0 deletions app/Resources/views/page/index.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends 'base.html.twig' %}

{#
This is an example template to render content or SimpleCms pages. You
can configure this template by setting template_by_class in the CmfRoutingBundle
configuration.
http://symfony.com/doc/current/cmf/bundles/routing/dynamic.html#configuring-the-controller-for-a-route
#}

{% block body %}
{{ cmfMainContent|raw }}
{% endblock %}
20 changes: 15 additions & 5 deletions app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,13 @@ public function __construct()
'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.'
);

$this->addPhpIniRequirement(
'date.timezone', true, false,
'date.timezone setting must be set',
'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
);
if (version_compare($installedPhpVersion, '7.0.0', '<')) {
$this->addPhpIniRequirement(
'date.timezone', true, false,
'date.timezone setting must be set',
'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
);
}

if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
$timezones = array();
Expand Down Expand Up @@ -677,6 +679,14 @@ function_exists('posix_isatty'),
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
);

if (class_exists('Symfony\Component\Intl\Intl')) {
$this->addRecommendation(
\Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
sprintf('intl ICU version installed on your system (%s) should match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
'In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.'
);
}

$this->addPhpIniRecommendation(
'intl.error_level',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
Expand Down
22 changes: 9 additions & 13 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ doctrine_cache:
phpcr_nodes:
type: file_system

# Cmf Configuration
# Main Cmf Configuration
cmf_core:
persistence:
phpcr: true
Expand All @@ -91,24 +91,20 @@ cmf_core:
publish_workflow: false

# Cmf Routing Configuration
cmf_routing:
dynamic:
templates_by_class:
Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page: 'AcmeDemoBundle:Page:index.html.twig'
#cmf_routing:
# dynamic:
# templates_by_class:
# Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page: 'page/index.html.twig'
# Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent: 'page/index.html.twig'

# Menu Configuration
knp_menu:
twig: true
#knp_menu:
# twig: true

# Block Configuration
sonata_block:
default_contexts: [cms]

# The FOSRestBundle is used by the CreateBundle
fos_rest:
view:
formats:
json: true

# Swiftmailer Configuration
swiftmailer:
transport: '%mailer_transport%'
Expand Down
11 changes: 3 additions & 8 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# AcmeDemoBundle routes (to be removed)
_demo:
resource: '@AcmeDemoBundle/Resources/config/routing.yml'
prefix: /demo

_cmf_create:
resource: '@CmfCreateBundle/Resources/config/routing/rest.xml'

app:
resource: '@AppBundle/Controller/'
type: annotation

_cmf_create:
resource: '@CmfCreateBundle/Resources/config/routing/rest.xml'
12 changes: 4 additions & 8 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ security:
security: false

main:
# activate different ways to authenticate

anonymous: ~
# activate different ways to authenticate

logout:
path: /demo/logout
target: /
# http_basic: ~
# http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate

# form_login: ~
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
form_login:
login_path: /demo/login
check_path: /demo/login_check
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@
}
],
"autoload": {
"psr-4": { "": "src/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"minimum-stability": "RC",
"require": {
Expand Down Expand Up @@ -74,4 +79,4 @@
"dev-master": "1.3-dev"
}
}
}
}
Loading

0 comments on commit d720441

Please sign in to comment.