本文整理匯總了PHP中Vtiger_Module_Model::getDeletedRecordCondition方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Module_Model::getDeletedRecordCondition方法的具體用法?PHP Vtiger_Module_Model::getDeletedRecordCondition怎麽用?PHP Vtiger_Module_Model::getDeletedRecordCondition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vtiger_Module_Model
的用法示例。
在下文中一共展示了Vtiger_Module_Model::getDeletedRecordCondition方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getRecentRecords
/**
* Function to get the list of recently visisted records
* @param <Number> $limit
* @return <Array> - List of Calendar_Record_Model
*/
public function getRecentRecords($limit = 10)
{
$db = PearDatabase::getInstance();
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$deletedCondition = parent::getDeletedRecordCondition();
$nonAdminQuery .= Users_Privileges_Model::getNonAdminAccessControlQuery($this->getName());
$query = 'SELECT * FROM vtiger_crmentity ';
if ($nonAdminQuery) {
$query .= " INNER JOIN vtiger_activity ON vtiger_crmentity.crmid = vtiger_activity.activityid " . $nonAdminQuery;
}
$query .= ' WHERE setype=? AND ' . $deletedCondition . ' AND modifiedby = ? ORDER BY modifiedtime DESC LIMIT ?';
$params = array($this->getName(), $currentUserModel->id, $limit);
$result = $db->pquery($query, $params);
$noOfRows = $db->num_rows($result);
$recentRecords = array();
for ($i = 0; $i < $noOfRows; ++$i) {
$row = $db->query_result_rowdata($result, $i);
$row['id'] = $row['crmid'];
$recentRecords[$row['id']] = $this->getRecordFromArray($row);
}
return $recentRecords;
}