本文整理汇总了PHP中GCore\Helpers\Html::image方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::image方法的具体用法?PHP Html::image怎么用?PHP Html::image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GCore\Helpers\Html
的用法示例。
在下文中一共展示了Html::image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _config_cells
public static function _config_cells($columns_info = array())
{
foreach ($columns_info as $c => $info) {
if (!empty($info['function'])) {
$function = !empty($info['function']) ? $info['function'] : '';
if (is_array($info['function'])) {
foreach ($info['function'] as $k => $fn) {
self::$columns_info[$c]['function'][$k] = $fn;
}
} else {
self::$columns_info[$c]['function'] = $function;
}
}
if (!empty($info['html'])) {
$html = !empty($info['html']) ? $info['html'] : '';
if (is_array($info['html'])) {
foreach ($info['html'] as $k => $htm) {
self::$columns_info[$c]['html'][$k] = $htm;
}
} else {
self::$columns_info[$c]['html'] = $html;
}
}
if (!empty($info['image'])) {
$image_params = !empty($info['image_params']) ? $info['image_params'] : array();
$src = !empty($info['image']) ? $info['image'] : '';
if (is_array($info['image'])) {
foreach ($info['image'] as $k => $img) {
self::$columns_info[$c]['image'][$k] = \GCore\Helpers\Html::image($img, $image_params);
}
} else {
self::$columns_info[$c]['image'] = \GCore\Helpers\Html::image($src, $image_params);
}
}
if (!empty($info['link'])) {
$path = !empty($info['link']) ? $info['link'] : '';
if (is_array($info['link'])) {
foreach ($info['link'] as $k => $link) {
self::$columns_info[$c]['link'][$k] = r_($link);
}
} else {
self::$columns_info[$c]['link'] = r_($path);
}
}
if (!empty($info['field'])) {
$field = !empty($info['field']) ? $info['field'] : '';
if (is_array($info['field'])) {
foreach ($info['field'] as $k => $fld) {
self::$columns_info[$c]['field'][$k] = $fld;
}
} else {
self::$columns_info[$c]['field'] = $field;
}
}
self::$columns_info[$c]['style'] = !empty($info['style']) ? $info['style'] : '';
self::$columns_info[$c]['class'] = !empty($info['class']) ? (array) $info['class'] : '';
}
}