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


PHP Activity::load方法代码示例

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


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

示例1: _new

 public function _new($followup = FALSE)
 {
     if (array_key_exists('followup', $this->_data)) {
         $followup = $this->_data['followup'];
     }
     $this->view->set('page_title', 'New CRM Activity');
     // New follow-up activity
     if ($followup) {
         $this->view->set('page_title', 'New CRM Follow-up Activity');
         unset($this->_data['id']);
         $activity = new Activity();
         $activity->load($followup);
         $this->_data['person_id'] = $activity->person_id;
         $this->_data['company_id'] = $activity->company_id;
         $this->_data['name'] = $activity->name;
         $this->_data['description'] = $activity->description;
         $this->_data['completed'] = '';
     }
     // Edit existing activity
     if (isset($this->_data['id'])) {
         $this->view->set('page_title', 'Edit CRM Activity');
     }
     // New activity from opportunity
     if (isset($this->_data['opportunity_id'])) {
         $this->view->set('page_title', 'New CRM Activity');
         $opportunity = DataObjectFactory::Factory('Opportunity');
         $opportunity->load($this->_data['opportunity_id']);
         $this->_data['person_id'] = $opportunity->person_id;
         $this->_data['company_id'] = $opportunity->company_id;
     }
     parent::_new();
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:32,代码来源:ActivitysController.php

示例2: load

 /**
  * load in the Activities for the given SQL statement
  *
  * @param string $sql
  * @param array $params the parameters that go into the sql statement
  * @param String $style (optional - default 'long') may be 'short' or 'long' or 'cif'
  * @return ActivitySet (this)
  */
 function load($sql, $params, $style = 'long')
 {
     global $DB;
     if (!isset($params)) {
         $params = array();
     }
     // get records
     $resArray = $DB->select($sql, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         for ($i = 0; $i < $count; $i++) {
             $array = $resArray[$i];
             $a = new Activity();
             $xml = $array['XML'];
             $activity = $a->load($array['ItemID'], $array['UserID'], $array['Type'], $array['ModificationDate'], $array['ChangeType'], $xml, $style);
             if (!$activity instanceof Error) {
                 $this->add($a);
             }
         }
         $this->totalno = count($this->activities);
     } else {
         return database_error();
     }
     return $this;
 }
开发者ID:uniteddiversity,项目名称:DebateHub,代码行数:33,代码来源:activityset.class.php

示例3: getObject

 /**
  * 根据name和id返回建筑的引用。这个函数的动作由,读,获取引用,快照
  *
  * @var $name	建筑的名字
  * @var $oid	建筑的id
  * 
  * @return object building的引用
  */
 private function getObject($name, $oid)
 {
     //------------------------
     //step1:读出建筑
     $old_data = $this->readObject($name, $oid);
     //------------------------
     //step2:对建筑做快照
     switch ($name) {
         case 'storage':
             $object = new Storage();
             break;
         case 'building':
             $object = new Building();
             break;
         case 'activity':
             $object = new Activity();
             break;
         default:
             echo 'error: bad name' . $name;
     }
     $object->load($old_data);
     //-----------------
     //step3:返回建筑引用
     return $object;
 }
开发者ID:kirtgoh,项目名称:fof-server,代码行数:33,代码来源:Farm.php


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