nystudio107 /
craft-units
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Units plugin for Craft CMS |
||
| 4 | * |
||
| 5 | * A plugin for handling physical quantities and the units of measure in which they're represented. |
||
| 6 | * |
||
| 7 | * @link https://nystudio107.com/ |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 8 | * @copyright Copyright (c) nystudio107 |
||
|
0 ignored issues
–
show
|
|||
| 9 | */ |
||
|
0 ignored issues
–
show
|
|||
| 10 | |||
| 11 | use PhpUnitsOfMeasure\PhysicalQuantity\Length; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Units config.php |
||
| 15 | * |
||
| 16 | * This file exists only as a template for the Units settings. |
||
| 17 | * It does nothing on its own. |
||
| 18 | * |
||
| 19 | * Don't edit this file, instead copy it to 'craft/config' as 'units.php' |
||
| 20 | * and make your changes there to override default settings. |
||
| 21 | * |
||
| 22 | * Once copied to 'craft/config', this file will be multi-environment aware as |
||
| 23 | * well, so you can have different settings groups for each environment, just as |
||
| 24 | * you do for 'general.php' |
||
| 25 | */ |
||
| 26 | return [ |
||
| 27 | // The default fully qualified class name of the unit of measure |
||
| 28 | 'defaultUnitsClass' => Length::class, |
||
| 29 | |||
| 30 | // The default value of the unit of measure |
||
| 31 | 'defaultValue' => 0.0, |
||
| 32 | |||
| 33 | // The default units that the unit of measure is in |
||
| 34 | 'defaultUnits' => 'ft', |
||
| 35 | |||
| 36 | // Whether the units the field can be changed |
||
| 37 | 'defaultChangeableUnits' => true, |
||
| 38 | |||
| 39 | // The default minimum allowed number |
||
| 40 | 'defaultMin' => 0, |
||
| 41 | |||
| 42 | // The default maximum allowed number |
||
| 43 | 'defaultMax' => null, |
||
| 44 | |||
| 45 | // The default number of digits allowed after the decimal point |
||
| 46 | 'defaultDecimals' => 3, |
||
| 47 | |||
| 48 | // The default size of the field |
||
| 49 | 'defaultSize' => 6, |
||
| 50 | ]; |
||
| 51 |