本文整理汇总了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;
}