public function Application::submitAdminForm in Module Object Oriented Programming API 7
Same name and namespace in other branches
- 6.2 component/moopapi.component.inc \Application::submitAdminForm()
- 6 component/moopapi.component.inc \Application::submitAdminForm()
- 7.2 component/moopapi.component.inc \Application::submitAdminForm()
File
- component/
moopapi.component.inc, line 184
Class
- Application
- @todo Desc for Application.
Code
public function submitAdminForm($form, &$form_state) {
$form_name = $form['#form_name']['#value'];
// Decorators handling.
switch ($form_name) {
case 'general':
// @todo Refactor it.
$decs = array(
'logger' => 'Logger',
'cacher' => 'Cacher',
);
$app_name = strtolower($this->app_name);
$decorators = array();
foreach ($decs as $field_name => $decorator_id) {
if ($form_state['values'][$field_name]) {
$decorators[$field_name] = $decorator_id;
}
}
variable_set("{$app_name}_decorators", serialize($decorators));
}
}