drago-ex/project-settings

Individual settings for the application.

Maintainers

Package info

github.com/drago-ex/project-settings

Type:drago-tools-resource

pkg:composer/drago-ex/project-settings

Statistics

Installs: 79

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.4 2026-06-04 17:06 UTC

This package is auto-updated.

Last update: 2026-06-08 16:51:26 UTC


README

Individual settings for the application.

License: MIT PHP version Coding Style

Requirements

  • PHP >= 8.3
  • 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.

Use in the presenter

use App\Core\Settings\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}

We can customize the settings according to our needs.

Administration form

The package also provides a simple settings form component.

use App\Core\Settings\Factory\SettingsControl;
use App\Core\Settings\SettingsRepository;

public function __construct(
	private readonly SettingsRepository $settingsRepository,
) {
	parent::__construct();
}

protected function createComponentSettings(): SettingsControl
{
	return new SettingsControl(
		settingsRepository: $this->settingsRepository,
	);
}

Render it in a Latte template:

{control settings}