當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XoopsPersistableObjectHandler類代碼示例

本文整理匯總了PHP中XoopsPersistableObjectHandler的典型用法代碼示例。如果您正苦於以下問題:PHP XoopsPersistableObjectHandler類的具體用法?PHP XoopsPersistableObjectHandler怎麽用?PHP XoopsPersistableObjectHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了XoopsPersistableObjectHandler類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 /**
  * Delete an object from the database
  * @see XoopsPersistableObjectHandler
  *
  * @param profileRegstep $obj
  * @param bool $force
  *
  * @return bool
  */
 function delete($obj, $force = false)
 {
     if (parent::delete($obj, $force)) {
         $field_handler =& xoops_getmodulehandler('field');
         return $field_handler->updateAll('step_id', 0, new Criteria('step_id', $obj->getVar('step_id')));
     }
     return false;
 }
開發者ID:gauravsaxena21,項目名稱:simantz,代碼行數:17,代碼來源:regstep.php

示例2: delete

 /**
  * Delete an object from the database
  * @see XoopsPersistableObjectHandler
  *
  * @param XoopsObject $obj
  * @param bool           $force
  *
  * @return bool
  */
 public function delete(XoopsObject $obj, $force = false)
 {
     if (parent::delete($obj, $force)) {
         $field_handler = xoops_getModuleHandler('field');
         return $field_handler->updateAll('step_id', 0, new Criteria('step_id', $obj->getVar('step_id')), $force);
     }
     return false;
 }
開發者ID:geekwright,項目名稱:XoopsCore25,代碼行數:17,代碼來源:regstep.php

示例3: insert

 function insert(&$object, $force = true)
 {
     if ($ret = parent::insert($object, $force)) {
         $object->unsetNew();
     }
     return $ret;
 }
開發者ID:yunsite,項目名稱:xoopsdc,代碼行數:7,代碼來源:object.php

示例4: countRelated

 public function countRelated($start = 0, $limit = 0, $sort = 'related_name', $order = 'ASC')
 {
     $criteria = new CriteriaCompo();
     $criteria->setSort($sort);
     $criteria->setOrder($order);
     $criteria->setStart($start);
     $criteria->setLimit($limit);
     return parent::getCount();
 }
開發者ID:RanLee,項目名稱:XoopsCore,代碼行數:9,代碼來源:page_related.php

示例5: getCatIds

 function getCatIds($uids = null)
 {
     if ($uids == null) {
         return false;
     }
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria("uid", "(" . implode(", ", $uids) . ")", "in"), 'AND');
     $cats = parent::getAll($criteria, null, false);
     return $cats;
 }
開發者ID:yunsite,項目名稱:xoopsdc,代碼行數:10,代碼來源:linkusers.php

示例6: getAllByFieldId

 /**
  * get all rows matching a condition
  *
  * @param  CriteriaElement $criteria  {@link CriteriaElement} to match
  *
  * @return array of row arrays, indexed by field_id
  */
 public function getAllByFieldId(CriteriaElement $criteria = null)
 {
     $rawRows = parent::getAll($criteria, null, false, false);
     usort($rawRows, array($this, 'visibilitySort'));
     $rows = array();
     foreach ($rawRows as $rawRow) {
         $rows[$rawRow['field_id']][] = $rawRow;
     }
     return $rows;
 }
開發者ID:geekwright,項目名稱:XoopsCore25,代碼行數:17,代碼來源:visibility.php

示例7: delete

 function delete(&$category)
 {
     global $xoopsModule;
     $forum_handler =& xoops_getmodulehandler('forum', 'newbb');
     $forum_handler->deleteAll(new Criteria("cat_id", $category->getVar('cat_id')), true, true);
     if ($result = parent::delete($category)) {
         // Delete group permissions
         return $this->deletePermission($category);
     } else {
         $category->setErrors("delete category error: " . $sql);
         return false;
     }
 }
開發者ID:BackupTheBerlios,項目名稱:haxoo-svn,代碼行數:13,代碼來源:category.php

示例8: getStats

 public function getStats($content_id)
 {
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('rating_content_id', $content_id));
     $i = 0;
     $total = 0;
     $obj = parent::getAll($criteria);
     foreach ($obj as $k => $v) {
         ++$i;
         $total += $v->getVar('rating_rating');
     }
     return array('voters' => $i, 'average' => $total / $i);
 }
開發者ID:RanLee,項目名稱:XoopsCore,代碼行數:13,代碼來源:page_rating.php

示例9:

 function __construct(&$db)
 {
     parent::__construct($db, "tdmcreate_modules", 'tdmcreate_modules', 'modules_id', 'modules_name');
 }
開發者ID:severnaya99,項目名稱:Sg-2010,代碼行數:4,代碼來源:tdmcreate_modules.php

示例10: deleteAllByStatus

 function deleteAllByStatus($status = MYINVITER_STATUS_WAITING)
 {
     $ret = parent::deleteAll(new Criteria('status', $status));
     return $ret;
 }
開發者ID:trabisdementia,項目名稱:xuups,代碼行數:5,代碼來源:item.php

示例11: delete

 /**
  * delete an item from the database
  *
  * @param object $item reference to the ITEM to delete
  * @param bool   $force
  *
  * @return bool FALSE if failed.
  */
 public function delete(&$item, $force = false)
 {
     // Deleting the files
     if (!$this->publisher->getHandler('file')->deleteItemFiles($item)) {
         $item->setErrors('An error while deleting a file.');
     }
     if (!parent::delete($item, $force)) {
         $item->setErrors('An error while deleting.');
         return false;
     }
     // Removing tags information
     if (xoops_isActiveModule('tag')) {
         $tag_handler = xoops_getmodulehandler('tag', 'tag');
         $tag_handler->updateByItem('', $item->getVar('itemid'), PUBLISHER_DIRNAME, 0);
     }
     return true;
 }
開發者ID:RanLee,項目名稱:Xoops_demo,代碼行數:25,代碼來源:item.php

示例12:

 function __construct(&$db)
 {
     parent::__construct($db, 'profile_visibility', 'profilevisibility', 'field_id');
 }
開發者ID:BackupTheBerlios,項目名稱:haxoo-svn,代碼行數:4,代碼來源:visibility.php

示例13: array

 /**
  * retrieve categories from the database
  *
  * @param object $criteria {@link CriteriaElement} conditions to be met
  * @param bool   $idAsKey  use the categoryid as key for the array?
  *
  * @return array array of {@link XoopsItem} objects
  */
 public function &getObjects($criteria = null, $idAsKey = false)
 {
     $ret = array();
     $theObjects =& parent::getObjects($criteria, true);
     foreach ($theObjects as $theObject) {
         if (!$idAsKey) {
             $ret[] = $theObject;
         } else {
             $ret[$theObject->categoryid()] = $theObject;
         }
         unset($theObject);
     }
     return $ret;
 }
開發者ID:trabisdementia,項目名稱:publisher,代碼行數:22,代碼來源:category.php

示例14: __construct

 public function __construct(\Xoops\Core\Database\Connection $db, $table = '', $className = '', $keyName = '', $identifierName = '')
 {
     parent::__construct($db, $table, $className, $keyName, $identifierName);
 }
開發者ID:RanLee,項目名稱:XoopsCore,代碼行數:4,代碼來源:objectpersistableHandlerTest.php

示例15: __construct

 /**
  * @param null|XoopsDatabase $db
  */
 public function __construct(XoopsDatabase $db)
 {
     parent::__construct($db, 'profile_category', 'profilecategory', 'cat_id', 'cat_title');
 }
開發者ID:geekwright,項目名稱:XoopsCore25,代碼行數:7,代碼來源:category.php


注:本文中的XoopsPersistableObjectHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。