本文整理匯總了PHP中CRM_Core_PseudoConstant::tasks方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_PseudoConstant::tasks方法的具體用法?PHP CRM_Core_PseudoConstant::tasks怎麽用?PHP CRM_Core_PseudoConstant::tasks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Core_PseudoConstant
的用法示例。
在下文中一共展示了CRM_Core_PseudoConstant::tasks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: task
/**
* where / qill clause for task / task status
*
* @return void
* @access public
*/
function task(&$values)
{
list($name, $op, $value, $grouping, $wildcard) = $values;
$targetName = $this->getWhereValues('task_id', $grouping);
if (!$targetName) {
return;
}
$taskID = CRM_Utils_Type::escape($targetName[2], 'Integer');
$clause = "civicrm_task_status.task_id = {$taskID} ";
$statusID = NULL;
if ($value) {
$statusID = CRM_Utils_Type::escape($value, 'Integer');
$clause .= " AND civicrm_task_status.status_id = {$statusID}";
}
$this->_where[$grouping][] = "civicrm_task_status.task_id = {$taskID} AND civicrm_task_status.status_id = {$statusID}";
$this->_tables['civicrm_task_status'] = $this->_whereTables['civicrm_task_status'] = 1;
$taskSelect = CRM_Core_PseudoConstant::tasks();
$this->_qill[$grouping][] = ts('Task') . ": {$taskSelect[$taskID]}";
if ($statusID) {
$statusSelect = CRM_Core_OptionGroup::values('task_status');
$this->_qill[$grouping][] = ts('Task Status') . ": {$statusSelect[$statusID]}";
}
}
示例2: task
static function task(&$form)
{
$form->add('hidden', 'hidden_task', 1);
if (CRM_Core_Permission::access('Quest')) {
$form->assign('showTask', 1);
// add the task search stuff
// we add 2 select boxes, one for the task from the task table
$taskSelect = array('' => '- select -') + CRM_Core_PseudoConstant::tasks();
$form->addElement('select', 'task_id', ts('Task'), $taskSelect);
$form->addSelect('task_status', ts('Task Status'));
}
}