本文整理匯總了PHP中SettingsForm::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP SettingsForm::run方法的具體用法?PHP SettingsForm::run怎麽用?PHP SettingsForm::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SettingsForm
的用法示例。
在下文中一共展示了SettingsForm::run方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
{
parent::MailForm();
$this->parseSettings('inc/app/devnotes/forms/settings/settings.php');
$this->widgets['notes']->setValues(array('on' => intl_get('On'), 'off' => intl_get('Off'), 'date' => intl_get('Until date')));
$this->widgets['submit_button']->setValues(intl_get('Save Changes'));
$this->widgets['notes_date']->setValue(date('Y-m-d'));
if (DEVNOTES === true) {
$this->widgets['notes']->setValue('on');
} elseif (DEVNOTES === false) {
$this->widgets['notes']->setValue('off');
} else {
$this->widgets['notes']->setValue('date');
$this->widgets['notes_date']->setValue(DEVNOTES);
}
$this->widgets['contact']->setValue(appconf('contact'));
$this->widgets['ignore_list']->setValue(join(', ', appconf('ignore')));
}
function onSubmit($vals)
{
// update devnotes_config table and respond
if ($vals['notes'] == 'date') {
$vals['notes'] = $vals['notes_date'];
}
db_execute('update devnotes_config set notes = ?, contact = ?, ignore_list = ?', $vals['notes'], $vals['contact'], $vals['ignore_list']);
header('Location: ' . site_prefix() . '/index/devnotes-admin-action');
exit;
}
}
$form = new SettingsForm();
echo $form->run();