当前位置: 首页>>代码示例>>PHP>>正文


PHP UI::GetActionButtons方法代码示例

本文整理汇总了PHP中UI::GetActionButtons方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::GetActionButtons方法的具体用法?PHP UI::GetActionButtons怎么用?PHP UI::GetActionButtons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI的用法示例。


在下文中一共展示了UI::GetActionButtons方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_print_line_multi

    private function get_print_line_multi($data, $key0, $htmlid, $disp, $action_attr)
    {
        $buf = '<tr>';
        $keys = array_keys($this->_dattrs);
        //allow index field clickable, same as first action
        $actionLink = null;
        $indexActionLink = null;
        if ($action_attr != NULL) {
            if (is_array($action_attr->_minVal)) {
                $index = $action_attr->_minVal[0];
                $type = $data->GetChildVal($index);
                $ti = isset($action_attr->_minVal[$type]) ? $action_attr->_minVal[$type] : $action_attr->_minVal[1];
            } else {
                $ti = $action_attr->_minVal;
            }
            $actdata = $disp->GetActionData($action_attr->_maxVal, $ti, $key0);
            $actionLink = UI::GetActionButtons($actdata, 'icon');
            $indexActionLink = isset($actdata['v']) ? $actdata['v']['href'] : null;
        }
        foreach ($keys as $key) {
            $attr = $this->_dattrs[$key];
            if ($attr->IsFlagOn(DAttr::BM_HIDE)) {
                continue;
            }
            if ($key == 0) {
                if ($this->_icon != NULL) {
                    if ($attr->GetKey() == 'type' && is_array($attr->_maxVal) && is_array($this->_icon)) {
                        $type = $data->GetChildVal('type');
                        $icon_name = isset($this->_icon[$type]) ? $this->_icon[$type] : 'application';
                    } else {
                        $icon_name = $this->_icon;
                    }
                    $buf .= '<td class="icon"><img src="/res/img/icons/' . $icon_name . '.gif"></td>';
                }
            }
            $buf .= '<td';
            if (isset($this->_align[$key])) {
                $buf .= ' align="' . $this->_align[$key] . '"';
            }
            $buf .= '>';
            if ($attr->_type == 'action') {
                $buf .= $actionLink;
            } else {
                if ($attr->_type == 'sel1' && $data->GetChildVal($attr->GetKey()) != NULL) {
                    $attr->SetDerivedSelOptions($disp->GetDerivedSelOptions($this->_id, $attr->_minVal, $data));
                }
                if ($attr->GetKey() == $this->_holderIndex) {
                    $buf .= $attr->toHtml($data, $indexActionLink);
                    if ($this->_hasNote && ($note = $data->GetChildVal('note')) != NULL) {
                        $buf .= '<a href="javascript:void(0);" class="pull-right" rel="tooltip" data-placement="right"
								data-original-title="' . $note . '" data-html="true">
								<i class="fa fa-info-circle"></i></a>';
                    }
                } else {
                    $buf .= $attr->toHtml($data, NULL);
                }
            }
            $buf .= '</td>';
        }
        $buf .= "</tr>\n";
        return $buf;
    }
开发者ID:kopytov,项目名称:openlitespeed,代码行数:62,代码来源:DTbl.php

示例2: process_config

 protected function process_config()
 {
     //init here
     $this->_disp->InitConf();
     $this->loadConfig();
     $confdata = $this->getConfData($this->_disp);
     $needTrim = 0;
     $tblDef = DTblDef::GetInstance();
     $disp_act = $this->_disp->Get(DInfo::FLD_ACT);
     if ($disp_act == 's') {
         $validator = new ConfValidation();
         $extracted = $validator->ExtractPost($this->_disp);
         if ($extracted->HasErr()) {
             $this->_disp->Set(DInfo::FLD_ACT, 'S');
             $this->_disp->Set(DInfo::FLD_TopMsg, $extracted->Get(CNode::FLD_ERR));
             return $extracted;
         } else {
             $confdata->SavePost($extracted, $this->_disp);
             $this->setChanged(true);
             $needTrim = 2;
         }
     } elseif ($disp_act == 'a') {
         $added = new CNode(CNode::K_EXTRACTED, '');
         return $added;
     } elseif ($disp_act == 'c' || $disp_act == 'n') {
         // 'c': change, 'n': next
         $validator = new ConfValidation();
         $extracted = $validator->ExtractPost($this->_disp);
         if ($disp_act == 'n') {
             $this->_disp->SwitchToSubTid($extracted);
         }
         return $extracted;
     } elseif ($disp_act == 'D') {
         $confdata->DeleteEntry($this->_disp);
         $needTrim = 1;
     } elseif ($disp_act == 'I') {
         if ($this->instantiateTemplate()) {
             $needTrim = 1;
         }
     } elseif ($disp_act == 'd' || $disp_act == 'i') {
         if ($disp_act == 'd') {
             $actions = 'DC';
             $mesg = DMsg::UIStr('note_confirm_delete');
         } else {
             $actions = 'IC';
             $mesg = DMsg::UIStr('note_confirm_instantiate');
         }
         $adata = $this->_disp->GetActionData($actions);
         $mesg = '<p>' . $mesg . '</p>' . UI::GetActionButtons($adata, 'text');
         $this->_disp->Set(DInfo::FLD_TopMsg, $mesg);
     }
     $ctxseq = UIBase::GrabGoodInputWithReset('ANY', 'ctxseq', 'int');
     if ($ctxseq != 0) {
         if ($this->_curOne->ChangeContextSeq($ctxseq)) {
             $needTrim = 1;
         }
     }
     if ($needTrim) {
         $this->_disp->TrimLastId();
         // need reload
         $this->loadConfig();
         $confdata = $this->getConfData($this->_disp);
     }
     return $confdata;
 }
开发者ID:kopytov,项目名称:openlitespeed,代码行数:65,代码来源:ControllerBase.php


注:本文中的UI::GetActionButtons方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。