本文整理汇总了PHP中CRM_Core_BAO_Mapping::buildMappingForm方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_Mapping::buildMappingForm方法的具体用法?PHP CRM_Core_BAO_Mapping::buildMappingForm怎么用?PHP CRM_Core_BAO_Mapping::buildMappingForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_Mapping
的用法示例。
在下文中一共展示了CRM_Core_BAO_Mapping::buildMappingForm方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuickForm
public function buildQuickForm()
{
//get the saved search mapping id
$mappingId = null;
if ($this->_ssID) {
$mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
}
CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
parent::buildQuickForm();
}
示例2: buildQuickForm
public function buildQuickForm()
{
CRM_Core_BAO_Mapping::buildMappingForm($this, 'Export', $this->_mappingId, $this->_exportColumnCount, $blockCnt = 2, $this->get('exportMode'));
$this->addButtons(array(array('type' => 'back', 'name' => ts('Previous')), array('type' => 'next', 'name' => ts('Export'), 'spacing' => ' '), array('type' => 'done', 'icon' => 'close', 'name' => ts('Done'))));
}
示例3: buildQuickForm
public function buildQuickForm()
{
$fields = self::fields();
// Get fields of type date
// FIXME: This is a hack until our fields contain this meta-data
$dateFields = array();
foreach ($fields as $name => $field) {
if (strpos($name, '_date') || CRM_Utils_Array::value('data_type', $field) == 'Date') {
$dateFields[] = $name;
}
}
// Add javascript
CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js')->addSetting(array('searchBuilder' => array('newBlock' => $this->get('newBlock'), 'dateFields' => $dateFields, 'fieldOptions' => self::fieldOptions())));
//get the saved search mapping id
$mappingId = NULL;
if ($this->_ssID) {
$mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
}
CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
parent::buildQuickForm();
}
示例4: buildQuickForm
public function buildQuickForm()
{
require_once "CRM/Core/BAO/Mapping.php";
CRM_Core_BAO_Mapping::buildMappingForm($this, 'Export', $this->_mappingId, $this->_exportColumnCount, $blockCnt = 2, $this->get('exportMode'));
$this->addButtons(array(array('type' => 'back', 'name' => ts('<< Previous')), array('type' => 'next', 'name' => ts('Export >>'), 'spacing' => ' '), array('type' => 'done', 'name' => ts('Done'))));
}
示例5: buildQuickForm
/**
* Build quick form.
*/
public function buildQuickForm()
{
$fields = self::fields();
// Get fields of type date
// FIXME: This is a hack until our fields contain this meta-data
$dateFields = array();
$stringFields = array();
$searchByLabelFields = array();
foreach ($fields as $name => $field) {
if (strpos($name, '_date') || CRM_Utils_Array::value('data_type', $field) == 'Date') {
$dateFields[] = $name;
}
// it's necessary to know which of the fields are from string data type
if (isset($field['type']) && $field['type'] === CRM_Utils_Type::T_STRING) {
$stringFields[] = $name;
}
// it's necessary to know which of the fields are searchable by label
if (isset($field['searchByLabel']) && $field['searchByLabel']) {
$searchByLabelFields[] = $name;
}
}
// Add javascript
CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js', 1, 'html-header')->addSetting(array('searchBuilder' => array('newBlock' => $this->get('newBlock'), 'dateFields' => $dateFields, 'fieldOptions' => self::fieldOptions(), 'stringFields' => $stringFields, 'searchByLabelFields' => $searchByLabelFields, 'generalOperators' => array('' => ts('-operator-')) + CRM_Core_SelectValues::getSearchBuilderOperators(), 'stringOperators' => array('' => ts('-operator-')) + CRM_Core_SelectValues::getSearchBuilderOperators(CRM_Utils_Type::T_STRING))));
//get the saved search mapping id
$mappingId = NULL;
if ($this->_ssID) {
$mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
}
CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
parent::buildQuickForm();
}