Skip to content

Commit

Permalink
small tweaks to readme, sfThemeGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Apr 11, 2011
1 parent b8e245a commit a84a599
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -41,18 +41,18 @@ number of options:
# So does this!
$ php symfony theme:generate default --application=frontend --model=MyModel --accept-defaults

Pretty cool, right? So what else do you get with this plugin? Check out my [sfHadoriThemePlugin](http://github.com/bshaffer/sfHadoriThemePlugin)
to really see these themes in action. You won't be disappointed!
The `accept-defaults` option will prevent the plugin from prompting you for default values. Pretty cool, right? So what else do you get with this plugin?
Check out my [sfHadoriThemePlugin](http://github.com/bshaffer/sfHadoriThemePlugin) to really see these themes in action. You won't be disappointed!

How do I create my own theme?
-----------------------------

Well aren't you ambitious? If you want to create your own theme, it's not very difficult. Every theme must have a subclass of the sfThemeConfigration
class. This controls how your theme is set up. Your configuration class is mainly responsible for the following things:

- Prompting users for the information needed to generate your theme. (setup() method)
- Adding routes to the application's routing.yml (routesToPrepend() method)
- Copying the files from one location (your plugin) to another location in the application (filesToCopy() method)
- Prompting users for the information needed to generate your theme. (`setup` method)
- Adding routes to the application's routing.yml (`routesToPrepend` method)
- Copying the files from one location (your plugin) to another location in the application (`filesToCopy` method)

Is there anything else really cool I should know about?
-------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions lib/generator/sfThemeGenerator.class.php
Expand Up @@ -82,7 +82,7 @@ public function endCredentialCondition($params)
{
if (isset($params['credentials']))
{
return '[?php endif; ?]';
return "[?php endif; ?]\n";
}
}

Expand Down Expand Up @@ -173,9 +173,7 @@ public function getLinkToAction($actionName, $params, $object_link = false)

// Old style URL
if (strpos($route, "'@") === 0) {
if (is_array($urlOptions)) {
$options = array_merge($urlOptions, $linkOptions);
}
$options = $urlOptions ? array_merge($urlOptions, $linkOptions) : $linkOptions;
return $this->_renderOldStyleRoute($this->asPhp($label), $route, $this->parser->renderArray($options));
}

Expand Down

0 comments on commit a84a599

Please sign in to comment.