本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例8: retrieve
function retrieve($id = -1, $encode = true)
{
$ret_val = parent::retrieve($id, $encode);
$this->emailAddress->handleLegacyRetrieve($this);
return $ret_val;
}
示例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;
}