Search by

drago-ex / project-settings

accgit

Individual settings for the application.

Package info

github.com/drago-ex/project-settings

Type:drago-tools-resource

pkg:composer/drago-ex/project-settings

Statistics

Installs: 288

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.4.0 2026-10-18 04:07 UTC

This package is auto-updated.

Last update: 2026-10-25 08:48:21 UTC


README

English | Čeština

Individual settings for the application.

PHP version Tests Coding Style

Requirements

  • PHP >= 8.3, < 9
  • Nette Framework
  • Composer
  • Drago Project core packages

Installation

composer require drago-ex/project-settings

Project files

File copying is handled automatically by drago-ex/project-tools, which must be installed in your project. Without it, copy the files manually according to the copy section in this package's composer.json. To skip this package, set "skip": true under extra.drago-tools.packages.<package-name> in your root composer.json.

Administration

With drago-ex/project-backend-ui, the item "Settings" appears in the sidebar (Backend/Settings/2.menu.neon).

Use in the presenter

Add the trait to a base presenter whose templates need application settings:

use App\Core\Settings\SettingsRequire;
use Nette\Application\UI\Presenter;

abstract class BasePresenter extends Presenter
{
	use SettingsRequire;
}

Use in Latte template

{varType App\Core\Settings\Settings $settings}

{* website name *}
{$settings->get('website')}

{* website description *}
{$settings->get('description')}

{if $settings->has('website')}
	{$settings->get('website')}
{/if}

Permission provider

With drago-ex/permission, the access rules from permission.php are generated into the project by:

php vendor/bin/create-permission --packages