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


PHP Basic::retrieve方法代码示例

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


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

示例1: retrieve

 function retrieve($id = -1, $encode = true)
 {
     $ret_val = parent::retrieve($id, $encode);
     $this->_create_proper_name_field();
     $this->emailAddress->handleLegacyRetrieve($this);
     return $ret_val;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:7,代码来源:Person.php

示例2: retrieve

 /**
  * Retrieves the Activity specified.
  *
  * SugarBean's signature states that encode is true by default. However, as
  * we store JSON data, we want to modify that behaviour to be false so that
  * the JSON data does not have characters replaced by HTML entities.
  * @param  string  $id      GUID of the Activity record
  * @param  boolean $encode  Encode quotes and other special characters
  * @param  boolean $deleted Flag to allow retrieval of deleted records
  * @return Activity
  */
 public function retrieve($id, $encode = false, $deleted = true)
 {
     // TODO: Fix this after ENGRD-17 is resolved.
     $encode = false;
     parent::retrieve($id, $encode, $deleted);
     $this->last_comment_bean->populateFromRow(json_decode($this->last_comment, true));
     return $this;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:19,代码来源:Activity.php

示例3: retrieve

 /**
  * This overrides the default retrieve function setting the default to encode to false
  */
 function retrieve($id = '-1', $encode = false, $deleted = true)
 {
     $dashboard = parent::retrieve($id, false, $deleted);
     // Expand the metadata for processing.
     $metadata = json_decode($dashboard->metadata);
     // If we don't have a components in metadata for whatever reason, we're out, send back unchanged.
     if (!isset($metadata->components)) {
         return $dashboard;
     }
     $dirty = false;
     // Loop through the dashboard, drilling down to the dashlet level.
     foreach ($metadata->components as $component_key => $component) {
         foreach ($component->rows as $row_key => $row) {
             foreach ($row as $item_key => $item) {
                 // Check if this user has access to the module upon which this dashlet is based.
                 if (isset($item->context->module) && !SugarACL::checkAccess($item->context->module, 'access')) {
                     // The user does not have access, remove the dashlet.
                     unset($metadata->components[$component_key]->rows[$row_key][$item_key]);
                     // Check if this row is now empty.
                     if (count($metadata->components[$component_key]->rows[$row_key]) == 0) {
                         // This row is now empty, remove it and mark the metadata as dirty.
                         unset($metadata->components[$component_key]->rows[$row_key]);
                         $dirty = true;
                     }
                 }
             }
         }
     }
     // Check if we've modified the metadata.
     if ($dirty) {
         // Loop through the rows re-assigning sequential array keys for dashboard display.
         foreach ($metadata->components as $key => $value) {
             $metadata->components[$key]->rows = array_values($metadata->components[$key]->rows);
         }
     }
     // Re-encode and save the metadata back to the dashboard object before returning it.
     $dashboard->metadata = json_encode($metadata);
     return $dashboard;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:42,代码来源:Dashboard.php

示例4: retrieve

 /**
  * need to override to have a name field created for this class
  *
  * @see parent::retrieve()
  */
 public function retrieve($id = -1, $encode = true, $deleted = true)
 {
     $ret_val = parent::retrieve($id, $encode, $deleted);
     $this->_create_proper_name_field();
     return $ret_val;
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:11,代码来源:Person.php

示例5: retrieve

 /**
  * @see SugarBean::retrieve()
  */
 public function retrieve($id = -1, $encode = true, $deleted = true)
 {
     $ret_val = parent::retrieve($id, $encode, $deleted);
     $this->name = $this->document_name;
     return $ret_val;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:9,代码来源:File.php

示例6: retrieve

 function retrieve($id = -1, $encode = true, $deleted = true)
 {
     $res = parent::retrieve($id, $encode, $deleted);
     if (!empty($res)) {
         if (!empty($this->auth_token) && !empty($this->auth_token_secret)) {
             $this->api->setOAuthToken($this->auth_token, $this->auth_token_secret, $this->username);
             $this->api->setSubdomain($this->subdomain);
         }
     }
     return $res;
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:11,代码来源:xPhotobucketAccount.php

示例7: retrieve

 public function retrieve($id, $encode = true, $deleted = false)
 {
     // TODO: Remove after ENGRD-8/ENGRD-17.
     $encode = false;
     return parent::retrieve($id, $encode, $deleted);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:6,代码来源:Filters.php

示例8: retrieve

 function retrieve($id = -1, $encode = true)
 {
     $ret_val = parent::retrieve($id, $encode);
     $this->emailAddress->handleLegacyRetrieve($this);
     return $ret_val;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:6,代码来源:Company.php

示例9: retrieve

 /**
  * Retrieves the Comment specified.
  *
  * SugarBean's signature states that encode is true by default. However, as
  * we store JSON data, we want to modify that behaviour to be false so that
  * the JSON data does not have characters replaced by HTML entities.
  * @param  string  $id      GUID of the Comment record
  * @param  boolean $encode  Encode quotes and other special characters
  * @param  boolean $deleted Flag to allow retrieval of deleted records
  * @return Comment
  */
 public function retrieve($id = '-1', $encode = false, $deleted = true)
 {
     // TODO: Fix this after ENGRD-17 is resolved.
     $encode = false;
     parent::retrieve($id, $encode, $deleted);
     return $this;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:Comment.php


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