Definition at line 41 of file setting_auto_form.inc.
◆ buildForm()
SettingAutoForm::buildForm |
( |
|
$component_id = 0 | ) |
|
Definition at line 62 of file setting_auto_form.inc.
70 if ($this->
filter && $this->
filter->isExcluded($setting->name))
continue;
78 $componentSettings->fields = $fields;
79 parent::AutoForm($componentSettings,
"POST",
"?component_id={$component_id}");
83 if ($this->
filter && $this->
filter->isExcluded($setting->name))
continue;
94 if(
$setting->options ==
"FileUploadFieldRenderer")
97 $this->annotate(
$setting->name,
"<a href='/action/settings/download?setting_id={$setting->settings_id}'>{$setting->value}</a>");
100 else if (
$setting->options ==
"Permissions")
107 $renderer->dropdownMessage =
"Select User Roles";
111 $optionList =
$setting->formatOptionList();
112 if(isset($optionList))
113 $renderers[
$setting->settings_id] =
new SelectFieldRenderer($this,
$setting->name, prettify(
$setting->name), $optionList);
if(!Settings::getValue("blog", "enable_extended_subscription_fields")) $form submitLabel
Dummy data model to render a component's settings as a form, using the "type" field of the setting re...
static getExtension($component)
static getRolesArray()
Retrieves the array of roles and their names for the current site for use in a CMS form.
uploadSettingFile($field, $setting)
◆ save()
SettingAutoForm::save |
( |
| ) |
|
Definition at line 144 of file setting_auto_form.inc.
146 $this->patchUpReferences();
148 $this->configureValidators();
153 if (isset(
$_POST[
"#FORMID#"]))
155 $this->
id =
$_POST[
"#FORMID#"];
158 $this->msg = $this->validator->validate();
159 if ($this->msg !=
"")
return false;
163 $indexedSettings = reindexList($this->settings,
"name");
167 if(array_key_exists(
$name, $indexedSettings))
171 $setting->filter =
new InclusionFilter(
"value");
173 Cache::put(
"setting_{$setting->component}_{$setting->name}",
$setting->value);
177 Cache::invalidate(
"auto_form_defaults");
178 Cache::invalidate(
"config");
187 trace(
"Settings auto form returning true", 3);
static fireEventTo($event, $component, $parameter=null)
Fire an event to the specificed component.
◆ SettingAutoForm()
SettingAutoForm::SettingAutoForm |
( |
|
$component, |
|
|
|
$filter = null |
|
) |
| |
Definition at line 46 of file setting_auto_form.inc.
54 $this->settings = Query::create(
Settings,
"WHERE component=:component ORDER BY category, weight, name")
static fireEvent($event, $parameter=null, $mustBeConsumed=false)
Fire an event to all subscribers as detailed in their manifests.
The Settings class provides components with a common API for specifying application settings and conf...
◆ writeSettings()
SettingAutoForm::writeSettings |
( |
|
$settings | ) |
|
◆ $customSettings
SettingAutoForm::$customSettings = array() |
◆ $filter
SettingAutoForm::$filter = null |
◆ $settings
SettingAutoForm::$settings |
The documentation for this class was generated from the following file: