PHPackages                             foreverglory/theme-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. foreverglory/theme-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

foreverglory/theme-bundle
=========================

Symfony ThemeBundle

v2.1.0(10y ago)141MITPHP

Since Apr 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/foreverglory/theme-bundle)[ Packagist](https://packagist.org/packages/foreverglory/theme-bundle)[ Docs](http://github.foreverglory.me)[ RSS](/packages/foreverglory-theme-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

ThemeBundle
===========

[](#themebundle)

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

Introduction
------------

[](#introduction)

### Composer

[](#composer)

Add to `composer.json` in your project to `require` section:

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

### Add this bundle to your application's kernel

[](#add-this-bundle-to-your-applications-kernel)

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

### Conﬁgure service in your YAML configuration

[](#conﬁgure-service-in-your-yaml-configuration)

```
#app/conﬁg/conﬁg.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-examples)

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

Todo
----

[](#todo)

theme path format 主题路径格式化 like

```
app/Resources/TwigBundle/views/Exception/layout.html.twig

app/Resources       ==  theme dir
TwigBundle          ==  Bundle->getName()
views/Exception     ==  template path
layout.html.twig    ==  template file

```

I want format this Path.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~354 days

Total

3

Last Release

3756d ago

Major Versions

v1.0 → v2.0.02016-01-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f2db77628f7824d4dda8968f3dd7f314800bb3ae6663d788cd6614e92623695?d=identicon)[foreverglory](/maintainers/foreverglory)

---

Top Contributors

[![foreverglory](https://avatars.githubusercontent.com/u/1069963?v=4)](https://github.com/foreverglory "foreverglory (24 commits)")

---

Tags

symfonybundletheme

### Embed Badge

![Health badge](/badges/foreverglory-theme-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/foreverglory-theme-bundle/health.svg)](https://phpackages.com/packages/foreverglory-theme-bundle)
```

###  Alternatives

[wandi/easyadmin-plus-bundle

Wandi/EasyAdminPlusBundle

3826.2k](/packages/wandi-easyadmin-plus-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
