PHPackages                             rasuvaeff/yii3-settings-ui - 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. rasuvaeff/yii3-settings-ui

ActiveLibrary[Admin Panels](/categories/admin)

rasuvaeff/yii3-settings-ui
==========================

Admin UI panel for managing Yii3 runtime settings

v1.0.0(yesterday)00BSD-3-ClausePHPPHP 8.3 - 8.5CI passing

Since Jun 19Pushed yesterdayCompare

[ Source](https://github.com/rasuvaeff/yii3-settings-ui)[ Packagist](https://packagist.org/packages/rasuvaeff/yii3-settings-ui)[ Docs](https://github.com/rasuvaeff/yii3-settings-ui)[ RSS](/packages/rasuvaeff-yii3-settings-ui/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (26)Versions (2)Used By (0)

rasuvaeff/yii3-settings-ui
==========================

[](#rasuvaeffyii3-settings-ui)

[![Latest Stable Version](https://camo.githubusercontent.com/18d40d73816ead1e848562f55007e83bc6b42b61953029a4d5b822340e7f26bf/68747470733a2f2f706f7365722e707567782e6f72672f7261737576616566662f796969332d73657474696e67732d75692f76)](https://packagist.org/packages/rasuvaeff/yii3-settings-ui)[![Total Downloads](https://camo.githubusercontent.com/59ea3f46914626aebd932eff83badfc9bb78baf4bfd5f7c3a6a77f77da178462/68747470733a2f2f706f7365722e707567782e6f72672f7261737576616566662f796969332d73657474696e67732d75692f646f776e6c6f616473)](https://packagist.org/packages/rasuvaeff/yii3-settings-ui)[![Build](https://github.com/rasuvaeff/yii3-settings-ui/actions/workflows/build.yml/badge.svg)](https://github.com/rasuvaeff/yii3-settings-ui/actions/workflows/build.yml)[![Static analysis](https://github.com/rasuvaeff/yii3-settings-ui/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/rasuvaeff/yii3-settings-ui/actions/workflows/static-analysis.yml)[![Psalm level](https://camo.githubusercontent.com/68f7f31799f2b93c710b14ba3877072e7fe07ec9d7cee3fdf67e14beab3e1b6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7073616c6d2d6c6576656c5f312d626c75652e737667)](https://github.com/rasuvaeff/yii3-settings-ui/actions/workflows/static-analysis.yml)[![PHP](https://camo.githubusercontent.com/a682cd9bb3c58023e3717c891a00ec83f9e74ced32cc8695a9c4c2e1a905002d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7261737576616566662f796969332d73657474696e67732d75692f706870)](https://packagist.org/packages/rasuvaeff/yii3-settings-ui)[![License](https://camo.githubusercontent.com/6cb285b57819f8de0acfb34923298f4f569f962544e8fe35331da2d163f4e485/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d2d332d2d436c617573652d626c75652e737667)](LICENSE.md)

Admin UI panel for managing Yii3 runtime settings.

> Using an AI coding assistant? [llms.txt](llms.txt) contains a compact API reference you can share with the model.

A drop-in admin panel for [`rasuvaeff/yii3-settings`](https://github.com/rasuvaeff/yii3-settings): list runtime settings in a sortable grid, edit them with per-type validation, reset overrides back to config/default, and handle secret values safely (masked, never rendered in plaintext).

Requirements
------------

[](#requirements)

- PHP 8.3+
- `rasuvaeff/yii3-settings` ^1.0 - definitions, `SettingsInspector`, `WritableSettingsProvider`
- `yiisoft/yii-view-renderer`, `yiisoft/router`, `yiisoft/user`
- `yiisoft/html`, `yiisoft/validator`, `yiisoft/form-model`, `yiisoft/data`, `yiisoft/yii-dataview`
- A concrete router implementation (e.g. `yiisoft/router-fastroute`) - provided by your application
- Bootstrap 5 CSS loaded by the host application (views use Bootstrap classes, no inline styles)

The list grid is rendered server-side from the application DI container (`SettingsGridFactory`), so the host does **not** need to bootstrap `WidgetFactory`.

Installation
------------

[](#installation)

```
composer require rasuvaeff/yii3-settings-ui
```

Usage
-----

[](#usage)

The package ships Yii3 config-plugin wiring (`di`, `params`). Add your params to the merge chain:

```
use Rasuvaeff\Yii3SettingsUi\SettingsRoutes;

return [
    'rasuvaeff/yii3-settings' => [
        'definitions' => [
            // Presentation metadata (label/group/help/choices/readonly) lives on the
            // definition itself — a single source of truth, no parallel map.
            'mail.from' => ['type' => 'string', 'default' => 'noreply@example.com', 'group' => 'Mail'],
            'orders.max_items' => ['type' => 'int', 'default' => 100, 'label' => 'Max items per order', 'group' => 'Orders'],
            'billing.stripe_key' => ['type' => 'string', 'secret' => true, 'label' => 'Stripe secret key', 'group' => 'Billing'],
        ],
    ],
    SettingsRoutes::PARAM_KEY => [
        'route_prefix' => '/admin/settings',
        'layout' => null,
        'views' => [
            'list' => '/abs/path/to/settings-list.php',
            'edit' => '/abs/path/to/settings-edit.php',
        ],
        'middlewares' => [
            'all' => [AuthMiddleware::class],
        ],
        // RequestBodyParser is added automatically to POST routes (update, reset).
        // Set 'body_parser' => false if your pipeline already applies it globally.
    ],
];
```

`layout` controls the shared wrapper. `views.list` and `views.edit` override only the corresponding templates; they do not replace the layout.

Bind the settings contracts to your provider. With `rasuvaeff/yii3-settings-db` ^1.0 this is automatic — its config-plugin binds `WritableSettingsProvider`, `SettingsProvider` and `SettingsInspector` to the same `DbSettingsProvider`. For a custom backend, bind them yourself:

```
use Rasuvaeff\Yii3Settings\{SettingsInspector, WritableSettingsProvider};
use Rasuvaeff\Yii3SettingsDb\DbSettingsProvider;

return [
    WritableSettingsProvider::class => DbSettingsProvider::class,
    SettingsInspector::class => DbSettingsProvider::class,
];
```

Routes
------

[](#routes)

MethodPathActionDefault nameGET`{prefix}``Yii\List\Action``settings/list`GET`{prefix}/{key}/edit``Yii\Edit\Action``settings/edit`POST`{prefix}/{key}``Yii\Update\Action``settings/update`POST`{prefix}/{key}/reset``Yii\Reset\Action``settings/reset``middlewares.{all,list,edit,update,reset}` — add middlewares per slot without forking the routes. `RequestBodyParser` is added automatically to the POST routes (update, reset); set `'body_parser' => false` in params to opt out.

URLs and redirects are generated through the router (`UrlGeneratorInterface`) by route name; links stay correct under any prefix or subdomain. Override `route_names` in params when your app uses a different naming convention.

### Flat-route wiring

[](#flat-route-wiring)

Wire the bundled `config/routes.php` explicitly in `configuration.php`:

```
'routes' => 'vendor/rasuvaeff/yii3-settings-ui/config/routes.php',
```

The route prefix, names and middlewares are read from params (`SettingsRoutes::PARAM_KEY`).

### Group-based admin panel

[](#group-based-admin-panel)

Inside a `Group` (the typical approach for a shared-prefix admin area):

```
use Rasuvaeff\Yii3SettingsUi\SettingsRoutes;
use Yiisoft\Router\Group;

Group::create(prefix: '/admin')->routes(
    ...SettingsRoutes::fromParams($params),
);
```

`fromParams()` reads prefix, names, middlewares and body-parser opt-out from `$params[SettingsRoutes::PARAM_KEY]`, so route registration and `SettingsUrls` URL generation are always in sync.

For full control over names, use `create()` directly and add matching `route_names` to params:

```
SettingsRoutes::create(
    prefix: '/settings',
    names: ['list' => 'admin/settings', 'edit' => 'admin/settings/edit'],
    middlewares: ['all' => [AuthMiddleware::class]],
)
```

Authorization
-------------

[](#authorization)

The package does not enforce access control internally. Protect routes via `middlewares.all` (or per-route keys). The package provides `CurrentUser` injection for audit events only.

Public API
----------

[](#public-api)

ClassDescription`SettingsRoutes`Builds the 4 routes; `fromParams($params)` for group-based panels, `create()` for full control`Yii\List\Action`GET flat grid (Group/Key/Value/Type/Source), secrets masked`Yii\Edit\Action`GET type-aware edit form`Yii\Update\Action`POST validate + save, re-render on invalid input`Yii\Reset\Action`POST remove override -&gt; config/default`Form\SettingForm`Submitted edit input (`present` + `value`)`Validation\SettingValueValidator`Validates + normalizes submitted input against the setting type (value-free error messages)`Renderer\TemplateRendererInterface`Rendering seam (testable actions)`Renderer\ViewTemplateRenderer`Default renderer over `WebViewRenderer``Event\SettingChanged`PSR-14 event after update/reset (secret-safe, actor = current user ID)`Exception\InvalidSettingValueException`Type validation failureThe `Service\*` responders/processors, `Service\SettingsUrls` and `Service\SettingsGridFactory` are `@internal` — auto-wired through `config/di.php`; the host references the `Yii\*\Action` handlers, not these.

Setting labels, groups, help text, choices and read-only flags come from `SettingDefinition` (`rasuvaeff/yii3-settings`), not a UI-side map.

Security
--------

[](#security)

ConcernBehaviourSecret valuesNever rendered: list shows `●●●● (set)` / `— (not set)`, edit shows an empty password fieldBlank secret submitKeeps the current value — `set()` is not calledValidation errorsRe-renders the edit page with HTTP 200Events`SettingChanged` carries `null` value for secret keys and optional `actor`Read-only settings`Update`/`Reset` rejected with HTTP 403CSRFEnforced by your application middleware; the form emits a hidden `_csrf` field when a `csrf_token` request attribute is presentOutputAll values pass through `Yiisoft\Html\Html::encode()` / Html widgets / GridView encodingCrypto/at-rest encryption is handled by the settings packages, not here — the UI only ever sees masked state for secrets.

Customising views
-----------------

[](#customising-views)

Override `views.list` and/or `views.edit` in params with absolute paths to your own templates. The templates receive the same variables as the bundled ones — see `resources/views/`.

The edit form uses input names scoped under `Setting[...]` (e.g. `Setting[value]`). Custom edit templates must preserve this scope for `SettingForm::fromParsedBody()` to work.

**Flash messages** are not built in — the package does not know about the host app's session. Subscribe to `SettingChanged` in your app to add flash notifications, cache invalidation, or audit trail entries.

Why `SettingChanged` Exists
---------------------------

[](#why-settingchanged-exists)

The package emits `SettingChanged` after update/reset so the host app can react without coupling itself to the UI actions. Typical uses are cache invalidation, audit logging, dependent reconfiguration, and observability hooks. The `actor` field carries the current user ID; `null` for guests.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0812d5572a7041dfe36e222d295b2e6dc55833a605350fcde58a51a5965ed30?d=identicon)[rasuvaeff](/maintainers/rasuvaeff)

---

Top Contributors

[![rasuvaeff](https://avatars.githubusercontent.com/u/1352718?v=4)](https://github.com/rasuvaeff "rasuvaeff (2 commits)")

---

Tags

Settingsuiadminyii3

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rasuvaeff-yii3-settings-ui/health.svg)

```
[![Health](https://phpackages.com/badges/rasuvaeff-yii3-settings-ui/health.svg)](https://phpackages.com/packages/rasuvaeff-yii3-settings-ui)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[typo3/cms-core

TYPO3 CMS Core

3312.9M4.8k](/packages/typo3-cms-core)[yiisoft/app

Yii3 web application template

36913.9k](/packages/yiisoft-app)

PHPackages © 2026

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