本文整理汇总了PHP中CRM_Core_Form_Date::addDateRangeToForm方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form_Date::addDateRangeToForm方法的具体用法?PHP CRM_Core_Form_Date::addDateRangeToForm怎么用?PHP CRM_Core_Form_Date::addDateRangeToForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Form_Date
的用法示例。
在下文中一共展示了CRM_Core_Form_Date::addDateRangeToForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildDateRange
/**
* This function is to retrieve the date range - relative or absolute
* and assign it to the form
* @param object $form - the form the dates should be added to
* @param string $fieldName
* @param integer $count
* @param string $from
* @param string $to
* @param string $fromLabel
* @param boolean $required
* @param array $operators Additional value pairs to add
* @param string $dateFormat
* @param string $displayTime
*
*
* @static
* @access public
*/
static function buildDateRange(&$form, $fieldName, $count = 1, $from = '_from', $to = '_to', $fromLabel = 'From:', $required = FALSE, $operators = array(), $dateFormat = 'searchDate', $displayTime = FALSE)
{
$selector = CRM_Core_Form_Date::returnDateRangeSelector($form, $fieldName, $count, $from, $to, $fromLabel, $required, $operators, $dateFormat, $displayTime);
CRM_Core_Form_Date::addDateRangeToForm($form, $fieldName, $selector, $from, $to, $fromLabel, $required, $dateFormat, $displayTime);
}