2017 © Pedro Peláez
 

symfony-bundle theme-bundle

Symfony ThemeBundle

image

foreverglory/theme-bundle

Symfony ThemeBundle

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

ThemeBundle

Symfony2 Bundle for theme choice, you can set theme's dir, theme's default or by class of set current theme. 设定主题目录,默认主题或者通过类设定当前主题 自定义主题目录、模板文件规则, (*1)

Introduction

Composer

Add to composer.json in your project to require section:, (*2)

{
    "foreverglory/theme-bundle": "~2.0"
}

Add this bundle to your application's kernel

//app/AppKernel.php
public function registerBundles()
{
    return array(
         // ...
        new Glory\Bundle\ThemeBundle\GloryThemeBundle(),
        // ...
    );
}

Configure service in your YAML configuration

#app/config/config.yml
glory_theme:
    default: default        #default theme, Allow Null or One of theme list. (默认主题,允许为空或者下面配置中的一个主题)
    switch: ~               #switch theme, class, if exist use class->getChecked(); (切换主题,类,如果存在,则优先取该类所选择的主题,参考) see: ThemeBundle/Switcher/*, you can write class
    themes:                 #themes list
        default:            #theme name, theme dir
            dir: %kernel.root_dir%/Resources/desktop
            format: ~       #todo
        mobile:
            path: %kernel.root_dir%/Resources/mobile

PHP examples

``` php $themeManager = $container->get('glory_theme.manager'); $themeManager->getThemes(); $themeManager->getCurrentTheme(); $themeManager->getDefaultTheme();, (*3)


Todo ------------ theme path format 主题路径格式化 like

app/Resources/TwigBundle/views/Exception/layout.html.twig, (*4)

app/Resources == theme dir TwigBundle == Bundle->getName() views/Exception == template path layout.html.twig == template file ``` I want format this Path., (*5)

The Versions

20/01 2017

dev-master

9999999-dev http://github.foreverglory.me

Symfony ThemeBundle

  Sources   Download

MIT

The Requires

 

bundle symfony theme

19/03 2016

v2.1.0

2.1.0.0 http://github.foreverglory.me

Symfony ThemeBundle

  Sources   Download

MIT

The Requires

 

bundle symfony theme

16/01 2016

v2.0.0

2.0.0.0 http://github.foreverglory.me

Symfony ThemeBundle

  Sources   Download

MIT

The Requires

 

bundle symfony theme

11/04 2014

v1.0

1.0.0.0 http://github.foreverglory.me

Symfony ThemeBundle

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme