當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Core_SelectValues::getHours方法代碼示例

本文整理匯總了PHP中CRM_Core_SelectValues::getHours方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_SelectValues::getHours方法的具體用法?PHP CRM_Core_SelectValues::getHours怎麽用?PHP CRM_Core_SelectValues::getHours使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Core_SelectValues的用法示例。


在下文中一共展示了CRM_Core_SelectValues::getHours方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildQuickForm

 /**
  * Function to build the form
  *
  * @return None
  * @access public
  */
 function buildQuickForm()
 {
     parent::buildQuickForm();
     if ($this->_action & CRM_CORE_ACTION_DELETE) {
         return;
     }
     $activityType = CRM_Core_PseudoConstant::activityType(false);
     $this->applyFilter('__ALL__', 'trim');
     $this->add('select', 'activity_type_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $activityType, array('onChange' => 'activity_get_description( )'), true);
     $this->addRule('activity_type_id', ts('Select a valid activity.'), 'required');
     $this->add('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_ActivityType', 'description'), false);
     $this->add('text', 'subject', ts('Subject'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'subject'), true);
     $this->add('date', 'scheduled_date_time', ts('Date and Time'), CRM_Core_SelectValues::date('datetime'), true);
     $this->addRule('scheduled_date_time', ts('Select a valid date.'), 'qfDate');
     $this->add('select', 'duration_hours', ts('Duration'), CRM_Core_SelectValues::getHours());
     $this->add('select', 'duration_minutes', null, CRM_Core_SelectValues::getMinutes());
     $this->add('text', 'location', ts('Location'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'location'));
     $this->add('textarea', 'details', ts('Details'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'details'));
     $this->add('select', 'status', ts('Status'), CRM_Core_SelectValues::activityStatus(), true);
     $this->_groupTree =& CRM_Core_BAO_CustomGroup::getTree('Activity', $this->_id, 0);
     if ($this->_action & CRM_CORE_ACTION_VIEW) {
         CRM_Core_BAO_CustomGroup::buildViewHTML($this, $this->_groupTree);
     } else {
         CRM_Core_BAO_CustomGroup::buildQuickForm($this, $this->_groupTree, 'showBlocks1', 'hideBlocks1');
     }
 }
開發者ID:bhirsch,項目名稱:voipdrupal-4.7-1.0,代碼行數:32,代碼來源:OtherActivity.php

示例2: buildQuickForm

 /**
  * Function to build the form
  *
  * @return None
  * @access public
  */
 function buildQuickForm()
 {
     parent::buildQuickForm();
     if ($this->_action & CRM_CORE_ACTION_DELETE) {
         return;
     }
     $this->applyFilter('__ALL__', 'trim');
     $this->add('text', 'subject', ts('Subject'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Meeting', 'subject'));
     $this->addRule('subject', ts('Please enter a valid subject.'), 'required');
     $this->addElement('date', 'scheduled_date_time', ts('Date and Time'), CRM_Core_SelectValues::date('datetime'));
     $this->addRule('scheduled_date_time', ts('Select a valid date.'), 'qfDate');
     $this->addRule('scheduled_date_time', ts('Please select Scheduled Date.'), 'required');
     $this->add('select', 'duration_hours', ts('Duration'), CRM_Core_SelectValues::getHours());
     $this->add('select', 'duration_minutes', null, CRM_Core_SelectValues::getMinutes());
     $this->add('text', 'location', ts('Location'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Meeting', 'location'));
     $this->add('textarea', 'details', ts('Details'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Meeting', 'details'));
     $status =& $this->add('select', 'status', ts('Status'), CRM_Core_SelectValues::activityStatus());
     $this->addRule('status', ts('Please select status.'), 'required');
     $this->_groupTree =& CRM_Core_BAO_CustomGroup::getTree('Meeting', $this->_id, 0);
     CRM_Core_BAO_CustomGroup::buildQuickForm($this, $this->_groupTree, 'showBlocks1', 'hideBlocks1');
 }
開發者ID:bhirsch,項目名稱:voipdrupal-4.7-1.0,代碼行數:27,代碼來源:Meeting.php


注:本文中的CRM_Core_SelectValues::getHours方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。