Skip to content

Commit

Permalink
Revert "fixed remaining Bundle suffixes"
Browse files Browse the repository at this point in the history
This reverts commit 315147c.
  • Loading branch information
fabpot committed Apr 4, 2011
1 parent c80ade9 commit 743592d
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
Expand Up @@ -36,15 +36,15 @@ protected function configure()
->setHelp(<<<EOT
The <info>doctrine:query:dql</info> command executes the given DQL query and outputs the results:
<info>./app/console doctrine:query:dql "SELECT u FROM User:User u"</info>
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u"</info>
You can also optional specify some additional options like what type of hydration to use when executing the query:
<info>./app/console doctrine:query:dql "SELECT u FROM User:User u" --hydrate=array</info>
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --hydrate=array</info>
Additionally you can specify the first result and maximum amount of results to show:
<info>./app/console doctrine:query:dql "SELECT u FROM User:User u" --first-result=0 --max-result=30</info>
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
EOT
);
}
Expand Down
Expand Up @@ -49,12 +49,12 @@ public function showAction(FlattenException $exception, DebugLoggerInterface $lo
if ($this->container->get('kernel')->isDebug() && 'html' == $format) {
$name = 'exception_full';
}
$template = 'Framework:Exception:'.$name.'.'.$format.'.twig';
$template = 'FrameworkBundle:Exception:'.$name.'.'.$format.'.twig';

$templating = $this->container->get('templating');
if (!$templating->exists($template)) {
$this->container->get('request')->setRequestFormat('html');
$template = 'Framework:Exception:'.$name.'.html.twig';
$template = 'FrameworkBundle:Exception:'.$name.'.html.twig';
}

$code = $exception->getStatusCode();
Expand Down
Expand Up @@ -178,7 +178,7 @@ protected function lookupTemplate(/*FieldInterface */$field)

$underscoredName = strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($className, '_', '.')));

if ($this->engine->exists($guess = 'Framework:Form:'.$underscoredName.'.html.php')) {
if ($this->engine->exists($guess = 'FrameworkBundle:Form:'.$underscoredName.'.html.php')) {
$template = $guess;
}

Expand Down
Expand Up @@ -33,7 +33,7 @@
),
),
'doctrine' => array(
'entity' => array('class' => 'Security:User', 'property' => 'username')
'entity' => array('class' => 'SecurityBundle:User', 'property' => 'username')
),
'service' => array(
'id' => 'user.manager',
Expand Down
Expand Up @@ -28,7 +28,7 @@
</provider>

<provider name="doctrine">
<entity class="Security:User" property="username" />
<entity class="SecurityBundle:User" property="username" />
</provider>

<provider name="service" id="user.manager" />
Expand Down
Expand Up @@ -22,7 +22,7 @@ security:
foo: { password: 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33, roles: ROLE_SUPER_ADMIN }
bar: { password: 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33, roles: [ROLE_USER, ROLE_ADMIN] }
doctrine:
entity: { class: Security:User, property: username }
entity: { class: SecurityBundle:User, property: username }
service:
id: user.manager
chain:
Expand Down
Expand Up @@ -63,11 +63,11 @@ private function addFormSection(ArrayNodeDefinition $rootNode)
->children()
->arrayNode('resources')
->addDefaultsIfNotSet()
->defaultValue(array('Twig::form.html.twig'))
->defaultValue(array('TwigBundle::form.html.twig'))
->validate()
->always()
->then(function($v){
return array_merge(array('Twig::form.html.twig'), $v);
return array_merge(array('TwigBundle::form.html.twig'), $v);
})
->end()
->prototype('scalar')->end()
Expand Down
Expand Up @@ -3,7 +3,7 @@
$container->loadFromExtension('twig', array(
'form' => array(
'resources' => array(
'My::form.html.twig',
'MyBundle::form.html.twig',
)
),
'extensions' => array(
Expand Down
Expand Up @@ -8,7 +8,7 @@

<twig:config auto-reload="true" autoescape="true" base-template-class="stdClass" cache="/tmp" cache-warmer="true" charset="ISO-8859-1" debug="true" strict-variables="true">
<twig:form>
<twig:resource>My::form.html.twig</twig:resource>
<twig:resource>MyBundle::form.html.twig</twig:resource>
</twig:form>
<twig:global key="foo" id="bar" type="service" />
<twig:global key="pi">3.14</twig:global>
Expand Down
@@ -1,7 +1,7 @@
twig:
form:
resources:
- My::form.html.twig
- MyBundle::form.html.twig
extensions:
- twig.extension.debug
- twig.extension.text
Expand Down
Expand Up @@ -35,7 +35,7 @@ public function testLoadEmptyConfiguration($format)

$this->assertEquals('Twig_Environment', $container->getParameter('twig.class'), '->load() loads the twig.xml file');
$this->assertFalse($container->getDefinition('twig.cache_warmer')->hasTag('kernel.cache_warmer'), '->load() does not enable cache warming by default');
$this->assertContains('Twig::form.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');
$this->assertContains('TwigBundle::form.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');

// Twig options
$options = $container->getParameter('twig.options');
Expand Down Expand Up @@ -65,8 +65,8 @@ public function testLoadFullConfiguration($format)

// Form resources
$resources = $container->getParameter('twig.form.resources');
$this->assertContains('Twig::form.html.twig', $resources, '->load() includes default template for form resources');
$this->assertContains('My::form.html.twig', $resources, '->load() merges new templates into form resources');
$this->assertContains('TwigBundle::form.html.twig', $resources, '->load() includes default template for form resources');
$this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources');

// Globals
$calls = $container->getDefinition('twig')->getMethodCalls();
Expand Down
Expand Up @@ -33,7 +33,7 @@ public function showAction(FlattenException $exception, DebugLoggerInterface $lo
$code = $exception->getStatusCode();

return $this->container->get('templating')->renderResponse(
'Framework:Exception:'.$template.'.html.twig',
'FrameworkBundle:Exception:'.$template.'.html.twig',
array(
'status_code' => $code,
'status_text' => Response::$statusTexts[$code],
Expand Down
Expand Up @@ -57,7 +57,7 @@ public function onCoreResponse(FilterResponseEvent $event)
// keep current flashes for one more request
$request->getSession()->setFlashes($request->getSession()->getFlashes());

$response->setContent($this->templating->render('WebProfiler:Profiler:toolbar_redirect.html.twig', array('location' => $response->headers->get('Location'))));
$response->setContent($this->templating->render('WebProfilerBundle:Profiler:toolbar_redirect.html.twig', array('location' => $response->headers->get('Location'))));
$response->setStatusCode(200);
$response->headers->remove('Location');
}
Expand Down

0 comments on commit 743592d

Please sign in to comment.