| @@ 88-92 (lines=5) @@ | ||
| 85 | // save value of properties if they exist |
|
| 86 | $configKeys = ['cssClass', 'default', 'format', 'path', 'label', 'clickable']; |
|
| 87 | ||
| 88 | foreach ($configKeys as $key) { |
|
| 89 | if (isset($this->config[$key])) { |
|
| 90 | $this->{$key} = $this->config[$key]; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| 94 | // save path |
|
| 95 | $this->path = str_replace('~', Config::get('root'), $this->path); |
|
| @@ 108-112 (lines=5) @@ | ||
| 105 | // save value of properties if they exist |
|
| 106 | $configKeys = $this->registerConfigKeys() + ['cssClass', 'default', 'description', 'label', 'readOnly', 'disabled', 'required', 'attributes']; |
|
| 107 | ||
| 108 | foreach ($configKeys as $key) { |
|
| 109 | if (isset($this->config[$key])) { |
|
| 110 | $this->{$key} = $this->config[$key]; |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||
| 114 | // css class |
|
| 115 | $this->cssClass .= ' form-control'; |
|