jeyroik/extas-system-options

There is no license information available for the latest version (0.1.0) of this package.

System options for extas

0.1.0 2023-07-12 11:02 UTC

This package is auto-updated.

Last update: 2024-04-12 12:26:48 UTC


README

tests codecov.io 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62383061666532363663323430363135313935652f6d61696e7461696e6162696c697479 Latest Stable Version Total Downloads Dependents

extas-system-options

System options for extas

usage

in an extas.json

{
    "system_options": [
        {
            "name": "some.name",
            "title": "Some param",
            "description": "Some system param",
            "value": "string|int|array|object"
        }
    ]
}

in a code

$system = new System();

$option = $system->systemOptions()->one([ISystemOption::FIELD__NAME => 'some.name']);
print_r($option->getValue());

//or

if ($system->hasOption('some.name')) {
    print_r($system->getOptionValue());
}