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


PHP Key::setTitle方法代码示例

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


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

示例1: saveKey

 /**
  * Saves a key for the form
  * @author Matthew McNaney <mcnaney at gmail dot com>
  */
 function saveKey()
 {
     if (empty($this->_key_id)) {
         $key = new Key();
         $key->setModule('phatform');
         $key->setItemName('form');
         $key->setItemId($this->_id);
         $key->setEditPermission('edit_forms');
         $key->setUrl('index.php?module=phatform&PHAT_MAN_OP=view&PHPWS_MAN_ITEMS[]=' . $this->_id);
     } else {
         $key = new Key($this->_key_id);
     }
     if ($this->_anonymous) {
         $key->restricted = 0;
     } else {
         $key->restricted = 1;
     }
     $key->setTitle($this->_label);
     $key->setSummary($this->_blurb0);
     $key->save();
     $this->_key_id = $key->id;
     return $key;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:27,代码来源:Form.php

示例2: saveKey

 public function saveKey()
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->_error)) {
             $key = new Key();
         }
     }
     $key->setModule('signup');
     $key->setItemName('sheet');
     $key->setItemId($this->id);
     $key->setEditPermission('edit_sheet');
     if (MOD_REWRITE_ENABLED) {
         $key->setUrl('signup/sheet_id/' . $this->id);
     } else {
         $key->setUrl('index.php?module=signup&amp;sheet_id=' . $this->id);
     }
     $key->setTitle($this->title);
     $result = $key->save();
     if (PHPWS_Error::logIfError($result)) {
         return false;
     }
     if (!$this->key_id) {
         $this->key_id = $key->id;
         $db = new PHPWS_DB('signup_sheet');
         $db->addWhere('id', $this->id);
         $db->addValue('key_id', $this->key_id);
         PHPWS_Error::logIfError($db->update());
     }
     return true;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:33,代码来源:Sheet.php

示例3: getHomeKey

 public static function getHomeKey()
 {
     if (!isset($GLOBALS['Home_Key'])) {
         $key = new Key();
         $key->id = 0;
         $key->module = $key->item_name = 'home';
         $key->item_id = 0;
         $key->setTitle(_('Home'));
         $key->setUrl('index.php');
         $GLOBALS['Home_Key'] = $key;
     }
     return $GLOBALS['Home_Key'];
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:13,代码来源:Key.php

示例4: saveKey

 public function saveKey()
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->_error)) {
             $key = new Key();
         }
     }
     $key->setModule('pagesmith');
     $key->setItemId($this->id);
     $key->setEditPermission('edit_page');
     $key->setUrl($this->url());
     foreach ($this->_sections as $sec) {
         if ($sec->sectype == 'text') {
             $key->setSummary($sec->getContent());
             break;
         }
     }
     $key->setTitle($this->title);
     $result = $key->save();
     if (PHPWS_Error::logIfError($result)) {
         return false;
     }
     if (!$this->key_id) {
         $this->key_id = $key->id;
         $db = new PHPWS_DB('ps_page');
         $db->addWhere('id', $this->id);
         $db->addValue('key_id', $this->key_id);
         PHPWS_Error::logIfError($db->update());
     } elseif ($this->_title_change) {
         PHPWS_Core::initModClass('menu', 'Menu.php');
         Menu::updateKeyLink($this->key_id);
     }
     $this->_key = $key;
     return true;
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:38,代码来源:PS_Page.php

示例5: saveKey

 public function saveKey($new_folder = true)
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->getError())) {
             $key = new Key();
         }
     }
     $key->setModule('filecabinet');
     $key->setItemName('folder');
     $key->setItemId($this->id);
     $key->setEditPermission('edit_folders');
     $key->setUrl($this->viewLink(false));
     $key->setTitle($this->title);
     $key->setSummary($this->description);
     $result = $key->save();
     if (PHPWS_Error::isError($result)) {
         return $result;
     }
     $this->key_id = $key->id;
     if ($new_folder) {
         $db = new PHPWS_DB('folders');
         $db->addWhere('id', $this->id);
         $db->addValue('key_id', $this->key_id);
         $result = $db->update();
         if (PHPWS_Error::isError($result)) {
             return $result;
         }
     }
     return true;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:33,代码来源:Folder.php

示例6: saveKey

 public function saveKey()
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->getError())) {
             $key = new Key();
         }
     }
     $key->setModule('calendar');
     $key->setItemName('schedule');
     $key->setItemId($this->id);
     if ($this->public) {
         $key->restricted = 0;
         $key->setEditPermission('edit_public');
     } else {
         $key->restricted = 2;
         $key->setEditPermission('edit_private');
     }
     $key->setUrl($this->getViewLink(false));
     $key->setTitle($this->title);
     $key->setSummary($this->summary);
     $result = $key->save();
     $this->key_id = $key->id;
     return $result;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:27,代码来源:Schedule.php

示例7: saveKey

 public function saveKey()
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->getError())) {
             $key = new Key();
         }
     }
     $key->setModule('calendar');
     $key->setItemName('event' . $this->_schedule->id);
     $key->setItemId($this->id);
     $key->setUrl($this->getViewLink());
     $key->setTitle($this->summary);
     if (!empty($this->description)) {
         $key->setSummary($this->description);
     }
     $result = $key->save();
     if (PHPWS_Error::isError($result)) {
         return $result;
     }
     $this->key_id = $key->id;
     return $key;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:25,代码来源:Event.php

示例8: saveKey

 public function saveKey()
 {
     if (empty($this->key_id)) {
         $key = new Key();
     } else {
         $key = new Key($this->key_id);
         if (PHPWS_Error::isError($key->getError())) {
             $key = new Key();
         }
     }
     $key->setModule('blog');
     $key->setItemName('entry');
     $key->setItemId($this->id);
     $key->setEditPermission('edit_blog');
     $key->setUrl($this->getViewLink(true));
     $key->setTitle($this->title);
     $key->setShowAfter($this->publish_date);
     $key->setHideAfter($this->expire_date);
     if (!empty($this->summary)) {
         $key->setSummary($this->summary);
     } else {
         $key->setSummary($this->entry);
     }
     $key->save();
     $this->key_id = $key->id;
     return $key;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:27,代码来源:Blog.php


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