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


PHP ArrayUtil::isTrue方法代码示例

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


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

示例1: end


//.........这里部分代码省略.........
                			$this->contextMenu[$temp_field['name']] = $contextMenu;
                		}*/
                /**********************************************************************************/
                if (isset($column['qtip']) && $column['qtip']) {
                    $temp_column['renderer'] = $this->afExtjs->asMethod(array("parameters" => "value, metadata, record", "source" => "var qtip = Ext.util.Format.htmlEncode(value); return '<span qtip=\"' + qtip + '\" {$style}>{$arrowSpan}' + value + '</span>';"));
                }
                //If numeric data, right align while rendering...
                // Disabled for now. JS error: "record is undefined"
                //$this->handleNumericColumns($temp_column);
                // Add filter here
                afExtjsGridFilter::add($this, $column, $temp_column, $temp_field);
                //Remote filter
                if (isset($column['sortIndex'])) {
                    $temp_column['sortIndex'] = $column['sortIndex'];
                }
                if (!isset($temp_column['id'])) {
                    $temp_column['id'] = $temp_column['dataIndex'];
                }
                if (!$this->attributes['tree']) {
                    if (isset($column['id']) && $column['id']) {
                        $temp_column['id'] = $temp_column['dataIndex'];
                        if (!isset($this->attributes[$readerPrivateName]['id'])) {
                            $this->attributes[$readerPrivateName]['id'] = $temp_column['dataIndex'];
                        }
                    }
                    if (isset($column['groupField']) && $column['groupField']) {
                        $this->attributes[$storePrivateName]['groupField'] = $temp_column['dataIndex'];
                    }
                }
                if (!$wasSort && isset($column['sort']) && in_array($column['sort'], array('ASC', 'DESC'))) {
                    $wasSort = true;
                    $this->defineSortInfo($storePrivateName, $temp_column['dataIndex'], $column['sort']);
                }
                if (!$firstSortableCol && ArrayUtil::isTrue($temp_column, 'sortable')) {
                    $firstSortableCol = $temp_column['dataIndex'];
                }
                $this->attributes['columns'][] = $this->afExtjs->asAnonymousClass($temp_column);
                if ($this->attributes['tree'] && !isset($this->attributes['master_column_id'])) {
                    $this->attributes['master_column_id'] = $temp_column['dataIndex'];
                }
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass($temp_field);
            }
            /*
             * Add listeners for context menu
             */
            $this->_addListenersForContextMenu($attributes);
            /**********************************************************/
            if (!$wasSort && $firstSortableCol) {
                $this->defineSortInfo($storePrivateName, $firstSortableCol, 'ASC');
            }
            $count_actions = is_object($this->actionsObject) ? count($this->actionsObject->attributes['actions']) : 0;
            if ($count_actions > 0) {
                for ($i = 1; $i <= $count_actions; $i++) {
                    $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => 'action' . $i, 'type' => 'string'));
                    $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => 'hide' . $i, 'type' => 'boolean'));
                }
            }
            $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => 'message'));
            $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => 'redirect'));
            $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => 'load'));
            if ($this->attributes['tree']) {
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => '_id', 'type' => 'int'));
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => '_parent', 'type' => 'auto'));
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => '_is_leaf', 'type' => 'bool'));
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => '_color', 'type' => 'auto'));
                $this->attributes[$readerPrivateName]['fields'][] = $this->afExtjs->asAnonymousClass(array('name' => '_cell_color', 'type' => 'auto'));
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:67,代码来源:afExtjsGrid.class.php

示例2: postProcess


//.........这里部分代码省略.........
                                }
                            }
                        }
                    } else {
                        if ($view == "list") {
                            if (isset($parse["params"]["name"])) {
                                $formoptions['name'] = $parse["params"]["name"];
                            }
                            if (isset($parse["remoteSort"])) {
                                $formoptions["remoteSort"] = $parse["remoteSort"] == "false" ? false : true;
                            }
                            if (isset($parse["pagerTemplate"])) {
                                $formoptions["pagerTemplate"] = $parse["pagerTemplate"];
                            }
                            if (isset($this->page) && is_array($this->page)) {
                                foreach ($this->page["areas"]["content"]["tabs"] as $thisTab) {
                                    if (isset($thisTab["components"][$parse["component"]]) && isset($thisTab["components"][$parse["component"]]["bindForm"])) {
                                        $formoptions["bindForm"] = $thisTab["components"][$parse["component"]]["bindForm"];
                                    }
                                }
                            }
                            if (!isset($formoptions["bindForm"])) {
                                $formoptions["bindForm"] = -1;
                            }
                            $formoptions["autoHeight"] = true;
                            $formoptions["clearGrouping"] = false;
                            $formoptions["frame"] = false;
                            $formoptions["tree"] = $parse["tree"] == "false" ? false : true;
                            $formoptions["select"] = $parse["select"] == "false" ? false : true;
                            $formoptions["pager"] = $parse["pager"] == "false" ? false : true;
                            $formoptions["border"] = $parse["border"] == "false" ? false : true;
                            $formoptions["portal"] = $parse["portal"] == "false" ? false : true;
                            //$formoptions["id"] = strtolower(str_replace(" ","_",$parse['title']));
                            $formoptions["remoteLoad"] = ArrayUtil::isTrue($parse, 'remoteLoad');
                            $formoptions["remoteFilter"] = isset($parse['remoteFilter']) ? true : false;
                            $formoptions["expandButton"] = isset($parse['expandButton']) ? true : false;
                            $formoptions["path"] = $this->context->getModuleName() . "/" . $this->context->getActionName();
                            if ($parse['action'] != '') {
                                $formoptions['action'] = $parse['action'];
                            }
                            if ($this->type == self::PAGE) {
                                $formoptions["idxml"] = $parse["module"] . "/" . $action_name;
                            }
                            if (isset($parse["plugin"])) {
                                $formoptions["plugin"] = $parse["plugin"];
                            }
                            if (isset($parse["iconCls"])) {
                                $formoptions["iconCls"] = $parse["iconCls"];
                            }
                            if (isset($parse["bodyStyle"])) {
                                $formoptions["bodyStyle"] = $parse["bodyStyle"];
                            }
                            if (is_array($current_area) && $this->area_types[$current_area["attributes"]["type"]] == "south" || $current_area == "footer") {
                                $formoptions["title"] = "";
                            }
                            if (!isset($formoptions["title"])) {
                                if ($current_area == "footer") {
                                    $formoptions["title"] = " ";
                                } else {
                                    if (isset($parse["title"])) {
                                        $formoptions["title"] = $parse["title"];
                                    }
                                }
                            }
                            if ($formoptions["tree"]) {
                                $formoptions["root_title"] = isset($parse["title"]) ? $parse["title"] : "root";
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:67,代码来源:XmlParser.class.php


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