本文整理汇总了PHP中renderer_base::pix_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP renderer_base::pix_icon方法的具体用法?PHP renderer_base::pix_icon怎么用?PHP renderer_base::pix_icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类renderer_base
的用法示例。
在下文中一共展示了renderer_base::pix_icon方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export_for_template
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param \renderer_base $output
* @return \stdClass
*/
public function export_for_template(\renderer_base $output)
{
if ($this->value) {
$this->displayvalue = $output->pix_icon('i/checked', get_string('yes'));
} else {
$this->displayvalue = $output->pix_icon('i/unchecked', get_string('no'));
}
return parent::export_for_template($output);
}
示例2: export_for_template
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param \renderer_base $output
* @return \stdClass
*/
public function export_for_template(\renderer_base $output)
{
if ($this->value) {
$this->edithint = get_string('settypedefault', 'core_tag');
$this->displayvalue = $output->pix_icon('i/checked', $this->edithint);
} else {
$this->edithint = get_string('settypestandard', 'core_tag');
$this->displayvalue = $output->pix_icon('i/unchecked', $this->edithint);
}
return parent::export_for_template($output);
}
示例3: export_for_template
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param \renderer_base $output
* @return \stdClass
*/
public function export_for_template(\renderer_base $output)
{
if ($this->value) {
$this->edithint = get_string('resetflag', 'core_tag');
$this->displayvalue = $output->pix_icon('i/flagged', $this->edithint) . " ({$this->value})";
} else {
$this->edithint = get_string('flagasinappropriate', 'core_tag');
$this->displayvalue = $output->pix_icon('i/unflagged', $this->edithint);
}
return parent::export_for_template($output);
}
示例4: export_for_template
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param \renderer_base $output
* @return \stdClass
*/
public function export_for_template(\renderer_base $output)
{
if ($this->value) {
$this->edithint = get_string('disable');
$this->displayvalue = $output->pix_icon('i/hide', get_string('disable'));
} else {
$this->edithint = get_string('enable');
$this->displayvalue = $output->pix_icon('i/show', get_string('enable'));
}
return parent::export_for_template($output);
}