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


PHP UrlUtil::url方法代码示例

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


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

示例1: end

    public function end()
    {
        /*$this->attributes['listeners']['afterrender']=$this->afExtjs->asMethod(array(
        			"parameters"=>"value, metadata, record",
        			"source"=>"var tb = this.getTopToolbar();
        			if(!tb) return;	
        			var box = this.getBox();
        			tb.setWidth(box.width);	"
        		));	
        		*/
        $this->attributes['canMask'] = $this->afExtjs->asMethod(array("parameters" => "", "source" => "return !Ext.isIE&&!" . $this->privateName . ".disableLoadMask&&!Ext.get('loading');"));
        if (!$this->attributes['tree']) {
            $this->attributes['view'] = $this->afExtjs->GroupingColorView(array('forceFit' => $this->attributes['forceFit'], 'groupTextTpl' => ' {text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'));
            if (isset($this->attributes['clearGrouping']) && $this->attributes['clearGrouping']) {
                @($this->attributes['listeners']['render']["source"] .= "this.store.clearGrouping();");
            }
        } else {
            $this->afExtjs->setAddons(array('css' => array($this->afExtjs->getPluginsDir() . 'treegrid/css/TreeGrid.css'), 'js' => array($this->afExtjs->getPluginsDir() . 'treegrid/TreeGrid.js', $this->afExtjs->getPluginsDir() . 'treegrid/Ext.ux.SynchronousTreeExpand.js')));
            $this->attributes['viewConfig'] = $this->afExtjs->asAnonymousClass(array('forceFit' => $this->attributes['forceFit']));
        }
        if (isset($this->proxy['url']) && count($this->columns) > 0) {
            $this->proxy['url'] = sfContext::getInstance()->getRequest()->getRelativeUrlRoot() . $this->proxy['url'];
            $filtersPrivateName = 'filters_' . Util::makeRandomKey();
            $storePrivateName = 'store_' . Util::makeRandomKey();
            $readerPrivateName = 'reader_' . Util::makeRandomKey();
            if ($this->attributes['pager']) {
                $pagingToolbarPrivateName = 'pt_' . Util::makeRandomKey();
            }
            $wasSort = false;
            $firstSortableCol = null;
            $summaryPlugin = false;
            foreach ($this->columns as $column) {
                $temp_column = null;
                $temp_field = null;
                $temp_name = 'Header ' . Util::makeRandomKey();
                $temp_column['dataIndex'] = isset($column['name']) ? $column['name'] : Util::stripText($temp_name);
                $temp_field['name'] = isset($column['name']) ? $column['name'] : Util::stripText($temp_name);
                //$temp_field['type']=isset($column['type'])?$column['type']:'auto';
                $temp_field['sortType'] = isset($column['sortType']) ? $column['sortType'] : 'asText';
                $temp_column['sortType'] = isset($column['sortType']) ? $column['sortType'] : 'asText';
                //Grid summary plugin
                $temp_column['summaryType'] = isset($column['summaryType']) ? $column['summaryType'] : null;
                if (!$summaryPlugin && $temp_column['summaryType'] != null) {
                    $this->attributes['plugins'][] = "new Ext.ux.grid.GridSummary";
                    $summaryPlugin = true;
                }
                $temp_column['header'] = isset($column['label']) ? $column['label'] : $temp_name;
                $temp_column['sortable'] = isset($column['sortable']) ? $column['sortable'] : true;
                if (isset($column['width']) && $column['width'] != 'auto') {
                    $temp_column['width'] = $column['width'];
                }
                $temp_column['hidden'] = isset($column['hidden']) ? $column['hidden'] : false;
                $temp_column['hideable'] = isset($column['hideable']) ? $column['hideable'] : true;
                $temp_column = $this->formatNumberColumn($temp_column);
                /**
                 * Edit link at defined column
                 * Please comment this block if the edit should be under the Actions column.
                 * This section looks the edit="true" in the xml columns. If found, and if 
                 * there is a row actions matching the name or label with edit, this will
                 * be transformed to the edit="true" column
                 */
                if (isset($column['edit']) && $column['edit'] || isset($column['action'])) {
                    //print_r($this->actionsObject);
                    if ($this->actionsObject) {
                        $actions = $this->actionsObject->getActions();
                        //print_r($actions);
                        if (is_array($actions)) {
                            foreach ($actions as $key => $action) {
                                if (isset($column['action']) && preg_match("/list[0-9]+_" . preg_replace("/^\\//", "", $column['action']) . "\$/", $action['name']) || isset($column['edit']) && $column['edit'] === "true" && (preg_match("/_edit\$/", $action['name']) || preg_match("/edit\$/i", $action['label']) || preg_match("/_modify\$/", $action['name']) || preg_match("/modify\$/i", $action['label']) || preg_match("/_update\$/", $action['name']) || preg_match("/update\$/i", $action['label']))) {
                                    $urlIndex = $action['urlIndex'];
                                    $credential = ComponentCredential::urlHasCredential($action['url']);
                                    $actionUrl = UrlUtil::url($action['url']);
                                    if (isset($action['load']) && $action['load'] == "page") {
                                        $actionUrl = $action['url'];
                                    }
                                    $temp_column['renderer'] = $this->afExtjs->asMethod(array("parameters" => "value, metadata, record", "source" => "if(!" . intval($credential) . ") return value;var action = record.get('" . $urlIndex . "'); if(!action) return value; var m = action.toString().match(/.*?\\?(.*)/);return '<a  href=\"" . $actionUrl . "?'+m[1]+'\" qtip=\"" . (isset($action['tooltip']) ? $action['tooltip'] : '') . "\">'+ value + '</a>';"));
                                    $this->actionsObject = $this->actionsObject->changeProperty($action['name'], 'hidden', true);
                                    if (isset(afExtjs::getInstance()->private[$this->actionsObject->privateName])) {
                                        unset(afExtjs::getInstance()->private[$this->actionsObject->privateName]);
                                    }
                                    $this->actionsObject->end();
                                    $this->movedRowActions++;
                                }
                            }
                        }
                    }
                }
                /*
                 * check for context menu
                 */
                $style = '';
                $arrowSpan = '';
                if (isset($column['contextMenu']) && $column['contextMenu']) {
                    $style = "";
                    $arrowSpan = '<span class="interactive-arrow"><a class="interactive-arrow-a"  href="#">&nbsp;</a></span>';
                    $contextMenu = context_menu($column['contextMenu'])->privateName;
                    $this->contextMenu[$temp_field['name']] = $contextMenu;
                    $temp_column['renderer'] = $this->afExtjs->asMethod(array("parameters" => "value, metadata, record", "source" => "return '<span {$style}>{$arrowSpan}' + value + '</span>';"));
                }
                /*else{
//.........这里部分代码省略.........
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:101,代码来源:afExtjsGrid.class.php


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