本文整理汇总了PHP中CRM_Core_SelectValues::getJobFrequency方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_SelectValues::getJobFrequency方法的具体用法?PHP CRM_Core_SelectValues::getJobFrequency怎么用?PHP CRM_Core_SelectValues::getJobFrequency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_SelectValues
的用法示例。
在下文中一共展示了CRM_Core_SelectValues::getJobFrequency方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuickForm
/**
* Build the form object.
*
* @param bool $check
*
* @return void
*/
public function buildQuickForm($check = FALSE)
{
parent::buildQuickForm();
if ($this->_action & CRM_Core_Action::DELETE) {
return;
}
$attributes = CRM_Core_DAO::getAttribute('CRM_Core_DAO_Job');
$this->add('text', 'name', ts('Name'), $attributes['name'], TRUE);
$this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array('CRM_Core_DAO_Job', $this->_id));
$this->add('text', 'description', ts('Description'), $attributes['description']);
$this->add('text', 'api_entity', ts('API Call Entity'), $attributes['api_entity'], TRUE);
$this->add('text', 'api_action', ts('API Call Action'), $attributes['api_action'], TRUE);
$this->add('select', 'run_frequency', ts('Run frequency'), CRM_Core_SelectValues::getJobFrequency());
/************************************
* begin com.klangsoft.flexiblejobs *
************************************/
$this->addDateTime('schedule_at', ts(($this->_id ? 'Next' : 'First') . ' Run Date / Time'), FALSE, array('formatType' => 'activityDateTime'));
$this->assign('schedule_at', $this->_id ? 'run next' : 'first be run');
/**********************************
* end com.klangsoft.flexiblejobs *
**********************************/
$this->add('textarea', 'parameters', ts('Command parameters'), "cols=50 rows=6");
// is this job active ?
$this->add('checkbox', 'is_active', ts('Is this Scheduled Job active?'));
$this->addFormRule(array('CRM_Admin_Form_Job', 'formRule'));
}
示例2: buildQuickForm
/**
* Function to build the form
*
* @param bool $check
*
* @return void
* @access public
*/
public function buildQuickForm($check = FALSE)
{
parent::buildQuickForm();
if ($this->_action & CRM_Core_Action::DELETE) {
return;
}
$attributes = CRM_Core_DAO::getAttribute('CRM_Core_DAO_Job');
$this->add('text', 'name', ts('Name'), $attributes['name'], TRUE);
$this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array('CRM_Core_DAO_Job', $this->_id));
$this->add('text', 'description', ts('Description'), $attributes['description']);
$this->add('text', 'api_entity', ts('API Call Entity'), $attributes['api_entity'], TRUE);
$this->add('text', 'api_action', ts('API Call Action'), $attributes['api_action'], TRUE);
$this->add('select', 'run_frequency', ts('Run frequency'), CRM_Core_SelectValues::getJobFrequency());
$this->add('textarea', 'parameters', ts('Command parameters'), "cols=50 rows=6");
// is this job active ?
$this->add('checkbox', 'is_active', ts('Is this Scheduled Job active?'));
$this->addFormRule(array('CRM_Admin_Form_Job', 'formRule'));
}