本文整理匯總了PHP中admin_setting::get_full_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin_setting::get_full_name方法的具體用法?PHP admin_setting::get_full_name怎麽用?PHP admin_setting::get_full_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類admin_setting
的用法示例。
在下文中一共展示了admin_setting::get_full_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: output_setting_flag
/**
* Output the checkbox for this setting flag. Should only be called if the flag is enabled.
*
* @param admin_setting $setting - The admin setting for this flag
* @return string - The html for the checkbox.
*/
public function output_setting_flag(admin_setting $setting)
{
$value = $setting->get_setting_flag_value($this);
$output = ' <input type="checkbox" class="form-checkbox" ' . ' id="' . $setting->get_id() . '_' . $this->get_shortname() . '" ' . ' name="' . $setting->get_full_name() . '_' . $this->get_shortname() . '" ' . ' value="1" ' . ($value ? 'checked="checked"' : '') . ' />' . ' <label for="' . $setting->get_id() . '_' . $this->get_shortname() . '">' . $this->get_displayname() . ' </label> ';
return $output;
}
示例2: output_setting_flag
/**
* Output the checkbox for this setting flag. Should only be called if the flag is enabled.
*
* @param admin_setting $setting - The admin setting for this flag
* @return string - The html for the checkbox.
*/
public function output_setting_flag(admin_setting $setting) {
global $OUTPUT;
$value = $setting->get_setting_flag_value($this);
$context = new stdClass();
$context->id = $setting->get_id() . '_' . $this->get_shortname();
$context->name = $setting->get_full_name() . '_' . $this->get_shortname();
$context->value = 1;
$context->checked = $value ? true : false;
$context->label = $this->get_displayname();
return $OUTPUT->render_from_template('core_admin/setting_flag', $context);
}