\App\ConsoleModule\ModelsFeatureManager

Webapp's optional feature manager

Summary

Methods
Properties
Constants
__construct()
disable()
enable()
list()
No public properties found
CONF_PATH
No protected methods found
No protected properties found
N/A
editConfig()
readConfig()
saveConfig()
$translator
N/A

Constants

CONF_PATH

CONF_PATH = __DIR__ . '/../../config/features.neon' : 

Path to the webapp's configuration file

Properties

$translator

$translator : \Nette\Localization\ITranslator

Type

\Nette\Localization\ITranslator — Translator

Methods

__construct()

__construct(\Nette\Localization\ITranslator  $translator) : mixed

Constructor

Parameters

\Nette\Localization\ITranslator $translator

ITranslator

Returns

mixed

disable()

disable(string[]  $names) : void

Disables optional features

Parameters

string[] $names

Names of disabled optional features

Throws

\Nette\IOException
\Nette\Neon\Exception
\App\ConsoleModule\Exceptions\UnknownFeatureException

enable()

enable(string[]  $names) : void

Enables optional features

Parameters

string[] $names

Names of enabled optional features

Throws

\Nette\IOException
\Nette\Neon\Exception
\App\ConsoleModule\Exceptions\UnknownFeatureException

list()

list() : string[][]

Lists the optional features

Throws

\Nette\Neon\Exception

Returns

string[][] —

Optional features

editConfig()

editConfig(string[]  $names, bool  $state) : void

Edits the configuration of optional features

Parameters

string[] $names

Names of edited optional features

bool $state

State of optional features

Throws

\Nette\IOException
\Nette\Neon\Exception
\App\ConsoleModule\Exceptions\UnknownFeatureException

readConfig()

readConfig() : array<string,bool>

Reads the configuration of optional features

Throws

\Nette\Neon\Exception

Returns

array

Optional feature configuration

saveConfig()

saveConfig(array<string,bool>  $config) : void

Saves the configuration of optional features

Parameters

array $config

Optional feature configuration

Throws

\Nette\IOException
\Nette\Neon\Exception