本文整理汇总了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);
}