当前位置: 首页>>代码示例>>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;未经允许,请勿转载。