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


PHP Sites::getName方法代码示例

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


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

示例1: Sites

 function test_Sites_set()
 {
     //Arrange
     $id = null;
     $services_id = null;
     $name = 'hotel deluxe';
     $analytics_profile = '5271170';
     $test_site = new Sites($id, $services_id, $name, $analytics_profile);
     //Act
     $test_site->setName('hotel max');
     $result1 = $test_site->getName();
     $test_site->setAnalyticsProfile('5271201');
     $result2 = $test_site->getAnalyticsProfile();
     //Assert
     $this->assertEquals('hotel max', $result1);
     $this->assertEquals('5271201', $result2);
 }
开发者ID:anniehoogendoorn,项目名称:google-analytics-app,代码行数:17,代码来源:SitesTest.php

示例2: gen_tree

    $root_cststyle = '';
    $sitePNAME = $pages[0]['PNAME'];
} else {
    $node_id = 1;
    $root_id = 'root_1';
    $root_name = $itext['TXT_PAGES'] != '' ? $itext['TXT_PAGES'] : '$TXT_PAGES';
    $root_cststyle = 'root';
    if (!$pages[0]['RSUB']) {
        $root_cststyle .= ' nosub';
    }
}
$props = array('TREE_ID' => $tree_id, 'TREE_LEVEL' => $tree_level, 'ID' => $root_id, 'CAPTION' => $root_name, 'URL' => $root_link, 'IC' => $this->imgpath . '/window/x.gif', 'EXP' => 'true', 'CHK' => 'false', 'CSTSTYLE' => $root_cststyle, 'TARGET' => '', 'TITLE' => '', 'SVRLOAD' => 'false', 'YG_ID' => $pages[$node_id]['ID'] . '-' . $siteID, 'YG_TYPE' => 'page', 'YG_PROPERTY' => 'name', 'PNAME' => $sitePNAME);
array_push($xml_tree, array('OBJECTID' => $tree_id, 'LEVEL' => $tree_level++, 'PROPS' => $props));
$siteMgr = new Sites();
for ($i = 0; $i < count($sites); $i++) {
    $sitename = $siteMgr->getName($sites[$i]['ID']);
    if ($sites[$i]['ID'] == $siteID) {
        $PageMgr = new PageMgr($sites[$i]['ID']);
        $yo = $PageMgr->tree->nest($pages);
        gen_tree($yo[$node_id]['CHILDREN'], $siteID, $icons->icon, $this->imgpath, $xml_tree, $tree_id, $tree_level, $itext, $maxlevels, $yo[$node_id]);
    }
}
function gen_tree($current, $site = 1, $icons, $imgpath, &$xml_tree, &$tree_id, &$tree_level, $itext, $maxlevels, $currentnode)
{
    if ($tree_level > $maxlevels) {
        $tree_level--;
        return;
    }
    $svrload = 'false';
    if ($tree_level == (int) $maxlevels) {
        $svrload = 'true';
开发者ID:nrueckmann,项目名称:yeager,代码行数:31,代码来源:pages_nodes_extras.php

示例3: getParents

 /**
  * Gets the parents of the specified Page
  *
  * @param int $pageId Page Id
  * @return array Array of parent Pages
  */
 function getParents($pageId)
 {
     $pageId = (int) $pageId;
     if ($this->permissions->checkInternal($this->_uid, $pageId, "RREAD")) {
         $parentnodes = $this->tree->getParents($pageId, $this->tree->getRoot());
         $parentnodeidsql = implode(',', $parentnodes);
         if (strlen($parentnodeidsql) == 0) {
             $parentnodeidsql = 0;
         }
         $sql = "SELECT\n\t\t\t\t\t\tgroup2.LFT, group2.RGT, group2.VERSIONPUBLISHED, group2.ID AS ID, group2.LEVEL AS LEVEL, group2.PARENT AS PARENT, group2.PNAME AS PNAME,\n\t\t\t\t\t\tMAX(prop.VERSION) AS VERSION, prop.ACTIVE AS ACTIVE, prop.HIDDEN AS HIDDEN, prop.LOCKED AS LOCKED, prop.TEMPLATEID AS TEMPLATEID, pv.NAME AS NAME\n\t\t\t\t\tFROM\n\t\t\t\t\t\t{$this->table} AS group2, yg_site_" . $this->_site . "_properties AS prop, yg_site_" . $this->_site . "_propsv as pv\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t(group2.ID = prop.OBJECTID) AND (group2.ID IN ({$parentnodeidsql})) AND (prop.VERSION = (SELECT MAX(VERSION) AS VERSION FROM yg_site_" . $this->_site . "_properties AS rgt WHERE rgt.OBJECTID = prop.OBJECTID)) AND\n\t\t\t\t\t\t(pv.OID = prop.ID)\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\tgroup2.LFT, group2.RGT, group2.VERSIONPUBLISHED, group2.ID ORDER BY group2.LEVEL DESC;";
         $parents0 = $this->cacheExecuteGetArray($sql);
         // Prepare weird array dimension
         $parents = array();
         for ($i = 0; $i < count($parents0); $i++) {
             $parents[$i][] = $parents0[$i];
         }
         $siteMgr = new Sites();
         $siteName = $siteMgr->getName($this->_site);
         if (count($parents) > 0) {
             $parents[count($parents) - 1][0]['NAME'] = $siteName;
         } else {
             $parents[0][0]['NAME'] = $siteName;
         }
         return $parents;
     } else {
         return false;
     }
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:34,代码来源:pagemgr.php


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