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