本文整理汇总了PHP中GCore\Helpers\Html::styles方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::styles方法的具体用法?PHP Html::styles怎么用?PHP Html::styles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GCore\Helpers\Html
的用法示例。
在下文中一共展示了Html::styles方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trs
public static function trs($depth = 0)
{
$trs = array();
foreach (\GCore\Helpers\DataPresenter::$cells_data as $k => $column_data) {
$tds = array();
$row = \GCore\Helpers\DataPresenter::$cells_rows[$k];
foreach (\GCore\Helpers\DataPresenter::$columns as $column) {
$data = $column_data[$column];
$info = !empty(\GCore\Helpers\DataPresenter::$columns_info[$column]) ? \GCore\Helpers\DataPresenter::$columns_info[$column] : array();
$indent_class = '';
/*if(!empty(\GCore\Helpers\DataPresenter::$config['children']) AND \GCore\Helpers\DataPresenter::$config['indent_column'] == $column){
$indent_class = " depth-".$depth;
}*/
$class = !empty($info['class']) ? \GCore\Helpers\Html::addClass($info['class'], "td-" . $column . $indent_class) : "td-" . $column . $indent_class;
$tds[] = \GCore\Helpers\Html::container('td', $data, array("class" => $class, "style" => empty($info['style']) ? '' : \GCore\Helpers\Html::styles($info['style'])));
}
self::$count = 1 - self::$count;
$row['k'] = $k;
$tr_contents = \GCore\Libs\Str::replacer(implode("\n", $tds), $row, array('escape' => true));
//$tr_contents = \GCore\Helpers\DataLoader::load($tr_contents, $row);
$trs[] = \GCore\Helpers\Html::container('tr', $tr_contents, array("class" => "row" . self::$count . " tr-list-" . self::$count));
//check children
/*if(!empty(\GCore\Helpers\DataPresenter::$config['children'])){
$children = \GCore\Libs\Arr::getVal($row, array(\GCore\Helpers\DataPresenter::$config['model_alias'], 'children'));
if(!empty($children)){
$trs = array_merge($trs, self::trs($children, $depth + 1));
}
}*/
}
return $trs;
}
示例2: sorter_build_link_params
public static function sorter_build_link_params($text, $params, $drc, $active)
{
//$params = array();
if ($active) {
$params['class'] = 'sort-link sorted-' . $drc;
$params['style'] = !empty($params['style']) ? $params['style'] : array();
$params['style']['padding-right'] = '15px';
$params['style']['background'] = "right center url('" . \GCore\C::get('GCORE_FRONT_URL') . "assets/images/sort_" . $drc . ".png') no-repeat transparent";
$params['style'] = \GCore\Helpers\Html::styles($params['style']);
} else {
$params['class'] = 'sort-link';
}
return array('params' => $params, 'text' => $text);
}
示例3: header
public static function header($ths = array())
{
if (!empty($ths)) {
self::$columns = array_keys($ths);
foreach ($ths as $c => $th) {
self::$headers[$c]['atts'] = array();
if (is_array($th)) {
self::$headers[$c]['text'] = $th['text'];
if (!empty($th['style'])) {
self::$headers[$c]['atts']['style'] = \GCore\Helpers\Html::styles($th['style']);
}
self::$headers[$c]['tag'] = 'span';
} else {
self::$headers[$c]['text'] = $th;
self::$headers[$c]['tag'] = 'span';
}
}
}
}