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


PHP Navigation::save方法代码示例

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


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

示例1: up

 public function up()
 {
     $navi = new Navigation();
     $navi->Translation['en']->caption = 'Profile';
     $navi->Translation['ja_JP']->caption = '[i:140]プロフィール';
     $navi->setType('mobile_home_center');
     $navi->setUri('member/profile');
     $navi->setSortOrder(0);
     $navi->save();
 }
开发者ID:Kazuhiro-Murota,项目名称:OpenPNE3,代码行数:10,代码来源:010_add_navigation_item_for_mobile_home_center.php

示例2: up

 public function up()
 {
     $navi = new Navigation();
     $navi->Translation['en']->caption = 'Profile';
     $navi->Translation['ja_JP']->caption = '[i:140]プロフィール';
     $navi->setType('mobile_home_center');
     $navi->setUri('member/profile');
     $navi->setSortOrder(0);
     $navi->save();
     // and try to fix community topic revision if the plugin is exists
     $conn = Doctrine_Manager::getInstance()->getConnectionForComponent('SnsConfig');
     $result = $conn->fetchOne('SELECT value FROM sns_config WHERE name = ?', array('opCommunityTopicPlugin_revision'));
     if (!$result) {
         Doctrine::getTable('SnsConfig')->set('opCommunityTopicPlugin_revision', '4');
     }
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:16,代码来源:010_add_navigation_item_for_mobile_home_center.php

示例3: up

 public function up()
 {
     $criteria = new Criteria();
     $criteria->add(NavigationPeer::TYPE, 'mobile_home_side');
     $criteria->add(NavigationPeer::URI, 'message/index');
     if (!NavigationPeer::doSelectOne($criteria)) {
         $navigation = new Navigation();
         $navigation->setType('mobile_home_side');
         $navigation->setUri('message/index');
         $navigation->setSortOrder(20);
         $navigation->setCulture('ja_JP');
         $navigation->setCaption('メッセージ');
         $navigation->setCulture('en');
         $navigation->setCaption('Message');
         $navigation->save();
     }
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:17,代码来源:002_update_op_message_plugin_0_8_2_2.php

示例4: up

 public function up()
 {
     $navi = new Navigation();
     $navi->Translation['en']->caption = 'Footprint';
     $navi->Translation['ja_JP']->caption = 'あしあと';
     $navi->setType('default');
     $navi->setUri('ashiato/list');
     $navi->setSortOrder(12);
     $navi->save();
     $navi = new Navigation();
     $navi->Translation['en']->caption = 'Footprint';
     $navi->Translation['ja_JP']->caption = '[i:91]あしあと';
     $navi->setType('mobile_home');
     $navi->setUri('ashiato/list');
     $navi->setSortOrder(12);
     $navi->save();
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:17,代码来源:002_install_op_ashiato_plugin_0_9_0_2.php

示例5: die

<?php

/**
 * Removes a page from the navigation. Called via a hook from
 * the page delete handler.
 */
if (!$this->internal) {
    die('Must be called by another handler');
}
$n = new Navigation();
$n->remove($this->data['page'], false);
$n->save();
require_once 'apps/navigation/lib/Functions.php';
navigation_clear_cache();
开发者ID:Selwyn-b,项目名称:elefant,代码行数:14,代码来源:delete.php

示例6: header

    header('WWW-Authenticate: Basic realm="Navigation"');
    header('HTTP/1.0 401 Unauthorized');
    echo json_encode($res);
    return;
}
$error = false;
$out = null;
$nav = new Navigation();
switch ($this->params[0]) {
    case 'add':
        $id = $_POST['page'];
        $parent = $_POST['parent'];
        if ($parent === 'false') {
            $parent = false;
        }
        if ($nav->add($id, $parent) && $nav->save()) {
            $out = array('msg' => sprintf('Page %s added to tree under %s.', $id, $parent), 'page' => $id, 'parent' => $parent);
        } else {
            $error = $nav->error;
        }
        break;
    case 'move':
        $id = $_POST['page'];
        $ref = $_POST['ref'];
        $pos = $_POST['pos'];
        if ($nav->move($id, $ref, $pos) && $nav->save()) {
            $out = array('msg' => sprintf('Page %s moved to %s %s.', $id, $pos, $ref), 'page' => $id, 'ref' => $ref, 'pos' => $pos);
        } else {
            $error = $nav->error;
        }
        break;
开发者ID:nathanieltite,项目名称:elefant,代码行数:31,代码来源:api.php

示例7: header

    header('WWW-Authenticate: Basic realm="Navigation"');
    header('HTTP/1.0 401 Unauthorized');
    echo json_encode($res);
    return;
}
$error = false;
$out = null;
$nav = new Navigation();
switch ($this->params[0]) {
    case 'update':
        $tree = $_POST['tree'];
        if (empty($tree)) {
            $tree = array();
        }
        require_once 'apps/navigation/lib/Functions.php';
        if ($nav->update($tree) && $nav->save()) {
            $out = array('msg' => sprintf('Nav json has been updated'));
        } else {
            $error = $nav->error;
        }
        break;
    default:
        $error = 'Unknown method';
        break;
}
if (!$error) {
    require_once 'apps/navigation/lib/Functions.php';
    navigation_clear_cache();
}
$res = new StdClass();
if ($error) {
开发者ID:Selwyn-b,项目名称:elefant,代码行数:31,代码来源:api.php


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