// if not set and not 0
!CRM_Utils_Array::value('id', $params)
) {
- $priority = CRM_Core_PseudoConstant::priority();
+ $priority = CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id');
$params['priority_id'] = array_search('Normal', $priority);
}
'type' => 'select',
'label' => ts('Priority'),
'attributes' =>
- CRM_Core_PseudoConstant::priority(),
+ CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
'required' => TRUE
),
'source_contact_id' => array(
);
}
if (!CRM_Utils_Array::value('priority_id', $defaults)) {
- $priority = CRM_Core_PseudoConstant::priority();
+ $priority = CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id');
$defaults['priority_id'] = array_search('Normal', $priority);
}
if (!CRM_Utils_Array::value('status_id', $defaults)) {
$this->add('select', 'protocol',
ts('Protocol'),
- array('' => ts('- select -')) + CRM_Core_PseudoConstant::mailProtocol(),
+ array('' => ts('- select -')) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_MailSettings', 'protocol'),
TRUE
);
CRM_Core_DAO::getAttribute('CRM_Core_DAO_Mapping', 'description')
);
- $mappingType = $this->addElement('select', 'mapping_type_id', ts('Mapping Type'), CRM_Core_PseudoConstant::mappingTypes());
+ $mappingType = $this->addElement('select', 'mapping_type_id', ts('Mapping Type'), CRM_Core_PseudoConstant::get('CRM_Core_DAO_Mapping', 'mapping_type_id'));
if ($this->_action == CRM_Core_Action::UPDATE) {
$mappingType->freeze();
* @access public
*/
public function buildQuickForm() {
- $wysiwyg_options = array('' => ts('Textarea')) + CRM_Core_PseudoConstant::wysiwygEditor();
+ $wysiwyg_options = array('' => ts('Textarea')) + CRM_Core_OptionGroup::values('wysiwyg_editor');
$config = CRM_Core_Config::singleton();
$extra = array();
$allMailSettings = array();
$mailSetting = new CRM_Core_DAO_MailSettings();
- $allProtocols = CRM_Core_PseudoConstant::mailProtocol();
+ $allProtocols = CRM_Core_PseudoConstant::get('CRM_Core_DAO_MailSettings', 'protocol');
//multi-domain support for mail settings. CRM-5244
$mailSetting->domain_id = CRM_Core_Config::domainID();
$activityTypes = CRM_Case_PseudoConstant::caseActivityType(FALSE, TRUE);
$activityStatus = CRM_Core_PseudoConstant::activityStatus();
- $activityPriority = CRM_Core_PseudoConstant::priority();
+ $activityPriority = CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id');
$url = CRM_Utils_System::url("civicrm/case/activity",
"reset=1&cid={$contactID}&caseid={$caseID}", FALSE, NULL, FALSE
*/
function phone_option_group($values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
- $option = $name == 'phone_phone_type_id' ? 'phoneType' : 'locationType';
- $options = CRM_Core_PseudoConstant::$option();
+ $option = ($name == 'phone_phone_type_id' ? 'phone_type_id' : 'location_type_id');
+ $options = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', $option);
$optionName = $options[$value];
$this->_qill[$grouping][] = ts('Phone') . ' ' . ($name == 'phone_phone_type_id' ? ts('type') : ('location')) . " $op $optionName";
$this->_where[$grouping][] = self::buildClause('civicrm_phone.' . substr($name, 6), $op, $value, 'Integer');
$form->applyFilter('__ALL__', 'trim');
//Website type select
- $form->addElement('select', "website[$blockId][website_type_id]", '', CRM_Core_PseudoConstant::websiteType());
+ $form->addElement('select', "website[$blockId][website_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'));
//Website box
$form->addElement('text', "website[$blockId][url]", ts('Website'),
// now add domain from addresses
$domainEmails = array();
- $domainFrom = CRM_Core_PseudoConstant::fromEmailAddress();
+ $domainFrom = CRM_Core_OptionGroup::values('from_email_address');
foreach (array_keys($domainFrom) as $k) {
$domainEmail = $domainFrom[$k];
$domainEmails[$domainEmail] = htmlspecialchars($domainEmail);
$phoneTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
$imProviders = CRM_Core_PseudoConstant::IMProvider();
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
foreach ($this->_location_types as $key => $value) {
$sel3['phone'][$key] = &$phoneTypes;
$phoneTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
$imProviders = CRM_Core_PseudoConstant::IMProvider();
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
//these mapper params need to set key as array and val as null.
$mapperFields = array();
$phoneTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
$imProviders = CRM_Core_PseudoConstant::IMProvider();
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
//initialize mapper perperty value.
// get the emails for this contact
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$params = array('contact_id' => $contactId);
$websites = CRM_Core_BAO_Website::getValues($params, CRM_Core_DAO::$_nullArray);
$propertyArray = explode('-', $property);
$websiteFld = $websiteKey . '-' . array_pop($propertyArray);
if (!empty($result->$websiteFld)) {
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$websiteType = $websiteTypes[$result->{"$websiteKey-website_type_id"}];
$websiteValue = $result->$websiteFld;
$websiteUrl = "<a href=\"{$websiteValue}\">{$websiteValue} ({$websiteType})</a>";
$honorIds['contribution'] = $this->id;
$idParams = array('id' => $honorID, 'contact_id' => $honorID);
CRM_Contact_BAO_Contact::retrieve($idParams, $honorDefault, $honorIds);
- $honorType = CRM_Core_PseudoConstant::honor();
+ $honorType = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$template->assign('honor_block_is_active', 1);
if (CRM_Utils_Array::value('prefix_id', $honorDefault)) {
static function buildHonoree(&$form) {
//Honoree section
$form->add('hidden', 'hidden_Honoree', 1);
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$extraOption = array('onclick' => "return enableHonorType();");
foreach ($honor as $key => $var) {
$honorTypes[$key] = $form->createElement('radio', NULL, NULL, $var, $key, $extraOption);
// retrieve individual prefix value for honoree
if (CRM_Utils_Array::value('hidden_Honoree', $params)) {
$individualPrefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$params['honor_prefix'] = CRM_Utils_Array::value(CRM_Utils_Array::value('honor_prefix_id',
$params
),
if (isset($defaults['honor_contact_id'])) {
$honorDefault = $ids = array();
$this->_honorID = $defaults['honor_contact_id'];
- $honorType = CRM_Core_PseudoConstant::honor();
+ $honorType = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$idParams = array(
'id' => $defaults['honor_contact_id'],
'contact_id' => $defaults['honor_contact_id'],
$this->assign('honor_block_title', CRM_Utils_Array::value('honor_block_title', $this->_values));
$prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$this->assign('honor_type', CRM_Utils_Array::value($params['honor_type_id'], $honor));
$this->assign('honor_prefix', CRM_Utils_Array::value($params['honor_prefix_id'], $prefix));
$this->assign('honor_first_name', $params['honor_first_name']);
$this->assign('honor_block_title', CRM_Utils_Array::value('honor_block_title', $this->_values));
$prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honorType = CRM_Core_PseudoConstant::honor();
+ $honorType = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$this->assign('honor_type', CRM_Utils_Array::value(CRM_Utils_Array::value('honor_type_id', $params), $honorType));
$this->assign('honor_prefix', CRM_Utils_Array::value(CRM_Utils_Array::value('honor_prefix_id', $params), $prefix));
$this->assign('honor_first_name', CRM_Utils_Array::value('honor_first_name', $params));
$extraOption = array('onclick' => "enableHonorType();");
// radio button for Honor Type
$honorOptions = array();
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
foreach ($honor as $key => $var) {
$honorTypes[$key] = $this->createElement('radio', NULL, NULL, $var, $key, $extraOption);
}
$this->assign('honor_block_title', CRM_Utils_Array::value('honor_block_title', $this->_values));
$prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$this->assign('honor_type', $honor[$params["honor_type_id"]]);
$this->assign('honor_prefix', ($params["honor_prefix_id"]) ? $prefix[$params["honor_prefix_id"]] : ' ');
$this->assign('honor_first_name', $params["honor_first_name"]);
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=$values[honor_contact_id]");
$values['honor_display'] = "<A href = $url>" . $dao->display_name . "</A>";
}
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
$values['honor_type'] = CRM_Utils_Array::value(CRM_Utils_Array::value('honor_type_id', $values), $honor);
}
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
$imProviders = CRM_Core_PseudoConstant::IMProvider();
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$multipleFields = array('url');
$nullIndex = $nullValueIndex = ' ';
if (substr($name, -1) == ']') {
$websiteTypeName = substr($name, 0, -1) . '-website_type_id]';
}
- $form->addElement('select', $websiteTypeName, NULL, CRM_Core_PseudoConstant::websiteType());
+ $form->addElement('select', $websiteTypeName, NULL, CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'));
}
else {
- $form->addElement('select', $name . '-website_type_id', NULL, CRM_Core_PseudoConstant::websiteType());
+ $form->addElement('select', $name . '-website_type_id', NULL, CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'));
}
}
// Note should be rendered as textarea
'editor_id'
);
$editor = strtolower(CRM_Utils_Array::value($editorID,
- CRM_Core_PseudoConstant::wysiwygEditor()
+ CRM_Core_OptionGroup::values('wysiwyg_editor')
));
if (!$editor || $forceTextarea) {
$editor = 'textarea';
$this->action($object, $action, $values[$object->id], $links, $permission);
if (isset($object->mapping_type_id)) {
- $mappintTypes = CRM_Core_PseudoConstant::mappingTypes();
+ $mappintTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Mapping', 'mapping_type_id');
$values[$object->id]['mapping_type'] = $mappintTypes[$object->mapping_type_id];
}
}
*/
private static $imProvider;
- /**
- * website protocols
- * @var array
- * @static
- */
- private static $websiteType;
-
- /**
- * im protocols
- * @var array
- * @static
- */
- private static $fromEmailAddress;
-
/**
* states, provinces
* @var array
*/
private static $worldRegions;
- /**
- * honorType
- * @var array
- * @static
- */
- private static $honorType;
-
/**
* activity status
* @var array
*/
private static $activityStatus;
- /**
- * priority
- * @var array
- * @static
- */
- private static $priority;
-
- /**
- * wysiwyg Editor
- * @var array
- * @static
- */
- private static $wysiwygEditor;
-
- /**
- * Mapping Types
- * @var array
- * @static
- */
- private static $mappingType;
-
/**
* Visibility
* @var array
*/
private static $visibility;
- /**
- * Mail Protocols
- * @var array
- * @static
- */
- private static $mailProtocol;
-
/**
* Greetings
* @var array
}
return self::$imProvider;
}
-
- /**
- * Get all the website types from database.
- *
- * The static array websiteType is returned, and if it's
- * called the first time, the <b>Website DAO</b> is used
- * to get all the Website Types.
- *
- * Note: any database errors will be trapped by the DAO.
- *
- * @access public
- * @static
- *
- * @return array - array reference of all Website types.
- *
- */
- public static function &websiteType() {
- if (!self::$websiteType) {
- self::$websiteType = CRM_Core_OptionGroup::values('website_type');
- }
- return self::$websiteType;
- }
-
- /**
- * Get the all From Email Address from database.
- *
- * The static array $fromEmailAddress is returned, and if it's
- * called the first time, DAO is used
- * to get all the From Email Address
- *
- * Note: any database errors will be trapped by the DAO.
- *
- * @access public
- * @static
- *
- * @return array - array reference of all From Email Address.
- */
- public static function &fromEmailAddress() {
- if (!self::$fromEmailAddress) {
- self::$fromEmailAddress = CRM_Core_OptionGroup::values('from_email_address');
- }
- return self::$fromEmailAddress;
- }
-
- /**
- * Get the all Mail Protocols from database.
- *
- * The static array mailProtocol is returned, and if it's
- * called the first time, the DAO is used
- * to get all the Mail Protocol.
- *
- * Note: any database errors will be trapped by the DAO.
- *
- * @access public
- * @static
- *
- * @return array - array reference of all Mail Protocols.
- */
- public static function &mailProtocol() {
- if (!self::$mailProtocol) {
- self::$mailProtocol = CRM_Core_OptionGroup::values('mail_protocol');
- }
- return self::$mailProtocol;
- }
-
+
/**
* Get all the State/Province from database.
*
return self::$worldRegions;
}
- /**
- * Get all Honor Type.
- *
- * The static array honorType is returned
- *
- * @access public
- * @static
- *
- * @param boolean $all - get All Honor Type.
- *
- * @return array - array reference of all Honor Types.
- *
- */
- public static function &honor() {
- if (!self::$honorType) {
- self::$honorType = CRM_Core_OptionGroup::values('honor_type');
- }
- return self::$honorType;
- }
-
/**
* Get all Activity Statuses.
*
return self::$activityStatus[$column];
}
- /**
- * Get all Priorities
- *
- * The static array Priority is returned
- *
- * @access public
- * @static
- *
- * @return array - array reference of all Priority
- */
- public static function &priority() {
- if (!self::$priority) {
- self::$priority = CRM_Core_OptionGroup::values('priority');
- }
-
- return self::$priority;
- }
-
- /**
- * Get all WYSIWYG Editors.
- *
- * The static array wysiwygEditor is returned
- *
- * @access public
- * @static
- *
- * @return array - array reference of all wysiwygEditors
- */
- public static function &wysiwygEditor() {
- if (!self::$wysiwygEditor) {
- self::$wysiwygEditor = CRM_Core_OptionGroup::values('wysiwyg_editor');
- }
- return self::$wysiwygEditor;
- }
-
/**
* Get all Visibility levels.
*
return self::$visibility[$column];
}
- /**
- * Get all mapping types
- *
- * @return array - array reference of all mapping types
- * @access public
- * @static
- */
- public static function &mappingTypes() {
- if (!self::$mappingType) {
- self::$mappingType = CRM_Core_OptionGroup::values('mapping_type');
- }
- return self::$mappingType;
- }
-
public static function &stateProvinceForCountry($countryID, $field = 'name') {
static $_cache = NULL;
'provider_id' => CRM_Core_PseudoConstant::IMProvider(),
'state_province_id' => CRM_Core_PseudoConstant::stateProvince(),
'suffix_id' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'suffix_id'),
- 'website_type_id' => CRM_Core_PseudoConstant::websiteType(),
+ 'website_type_id' => CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'),
'activity_type_id' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
'case_type_id' => CRM_Case_PseudoConstant::caseType('label', FALSE),
- 'priority_id' => CRM_Core_PseudoConstant::priority(),
+ 'priority_id' => CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
);
// for columns that appear in more than 1 table
"CRM_Mailing_Controller_Send_{$this->controller->_key}"
);
- $fromEmailAddress = CRM_Core_PseudoConstant::fromEmailAddress('from_email_address');
+ $fromEmailAddress = CRM_Core_OptionGroup::values('from_email_address');
if (empty($fromEmailAddress)) {
//redirect user to enter from email address.
$url = CRM_Utils_System::url('civicrm/admin/options/from_email_address', 'group=from_email_address&action=add&reset=1');
//handle mailing from name & address.
$fromEmailAddress = CRM_Utils_Array::value($formValues['from_email_address'],
- CRM_Core_PseudoConstant::fromEmailAddress('from_email_address')
+ CRM_Core_OptionGroup::values('from_email_address')
);
//get the from email address
//Add Reply-To to headers
if (CRM_Utils_Array::value('reply_to_address', $formValues)) {
- $replyToEmail = CRM_Core_PseudoConstant::fromEmailAddress('from_email_address');
+ $replyToEmail = CRM_Core_OptionGroup::values('from_email_address');
$params['replyto_email'] = CRM_Utils_Array::value($formValues['reply_to_address'], $replyToEmail);
}
throw new Exception("Could not find entry named $name in civicrm_mail_settings");
}
- $protocols = CRM_Core_PseudoConstant::mailProtocol();
+ $protocols = CRM_Core_PseudoConstant::get('CRM_Core_DAO_MailSettings', 'protocol');
switch ($protocols[$dao->protocol]) {
case 'IMAP':
// causes a conflict in standalone mode so skip in standalone for now
$this->addElement('checkbox', 'is_different_contribution_contact', ts('Record Payment from a Different Contact?'));
$this->add( 'select', 'honor_type_id', ts('Membership payment is : '),
- array( '' => ts( '-') ) + CRM_Core_PseudoConstant::honor() );
+ array( '' => ts( '-') ) + CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id') );
CRM_Contact_Form_NewContact::buildQuickForm($this,1, null, false,'contribution_');
}
// causes a conflict in standalone mode so skip in standalone for now
$this->addElement('checkbox', 'contribution_contact', ts('Record Payment from a Different Contact?'));
$this->add( 'select', 'honor_type_id', ts('Membership payment is : '),
- array( '' => ts( '-') ) + CRM_Core_PseudoConstant::honor() );
+ array( '' => ts( '-') ) + CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id') );
require_once 'CRM/Contact/Form/NewContact.php';
CRM_Contact_Form_NewContact::buildQuickForm($this,1, null, false,'contribution_');
}
) {
$honor_block_is_active = TRUE;
$prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Pledge_DAO_Pledge', 'honor_type_id');
$form->assign('honor_type', $honor[$params['honor_type_id']]);
$form->assign('honor_prefix', $prefix[$params['honor_prefix_id']]);
$form->assign('honor_first_name', $params['honor_first_name']);
$honorDefault = array();
$idParams = array('contact_id' => $this->_honorID);
CRM_Contact_BAO_Contact::retrieve($idParams, $honorDefault);
- $honorType = CRM_Core_PseudoConstant::honor();
+ $honorType = CRM_Core_PseudoConstant::get('CRM_Pledge_DAO_Pledge', 'honor_type_id');
$defaults['honor_prefix_id'] = $honorDefault['prefix_id'];
$defaults['honor_first_name'] = CRM_Utils_Array::value('first_name', $honorDefault);
$defaults['honor_last_name'] = CRM_Utils_Array::value('last_name', $honorDefault);
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=$values[honor_contact_id]");
$values["honor_display"] = "<A href = $url>" . $dao->display_name . "</A>";
}
- $honor = CRM_Core_PseudoConstant::honor();
+ $honor = CRM_Core_PseudoConstant::get('CRM_Pledge_DAO_Pledge', 'honor_type_id');
$values['honor_type'] = $honor[$values['honor_type_id']];
}
$showProfileOverlay = CRM_Core_BAO_UFGroup::showOverlayProfile();
$imProviders = CRM_Core_PseudoConstant::IMProvider();
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$languages = CRM_Core_PseudoConstant::languages();
while ($result->fetch()) {
if (isset($result->country)) {
'priority_id' =>
array('title' => ts('Priority'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Core_PseudoConstant::priority(),
+ 'options' => CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
),
),
'group_bys' =>
}
if (!empty($params['home_url'])) {
- $websiteTypes = CRM_Core_PseudoConstant::websiteType();
+ $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
$params['website'] = array(1 => array('website_type_id' => key($websiteTypes),
'url' => $params['home_url'],
),
// - sample: Any one value which is expected in the list of option values.
// - max: integer (default = 10) maximum number of option values expected.
$fields = array(
+ 'CRM_Project_DAO_Task' => array(
+ array(
+ 'fieldName' => 'priority_id',
+ 'sample' => 'Urgent',
+ ),
+ ),
+ 'CRM_Activity_DAO_Activity' => array(
+ array(
+ 'fieldName' => 'priority_id',
+ 'sample' => 'Urgent',
+ ),
+ ),
+ 'CRM_Core_DAO_MailSettings' => array(
+ array(
+ 'fieldName' => 'protocol',
+ 'sample' => 'Localdir',
+ ),
+ ),
+ 'CRM_Core_DAO_Mapping' => array(
+ array(
+ 'fieldName' => 'mapping_type_id',
+ 'sample' => 'Search Builder',
+ 'max' => 15,
+ ),
+ ),
+ 'CRM_Pledge_DAO_Pledge' => array(
+ array(
+ 'fieldName' => 'honor_type_id',
+ 'sample' => 'In Honor of',
+ ),
+ ),
+ 'CRM_Contribute_DAO_Contribution' => array(
+ array(
+ 'fieldName' => 'honor_type_id',
+ 'sample' => 'In Honor of',
+ ),
+ ),
+ 'CRM_Core_DAO_Website' => array(
+ array(
+ 'fieldName' => 'website_type_id',
+ 'sample' => 'Facebook',
+ ),
+ ),
+ 'CRM_Core_DAO_MappingField' => array(
+ array(
+ 'fieldName' => 'website_type_id',
+ 'sample' => 'Facebook',
+ ),
+ ),
'CRM_Contact_DAO_Contact' => array(
array(
'fieldName' => 'prefix_id',
'sample' => 'Home',
),
),
+ 'CRM_Core_DAO_Website' => array(
+ array(
+ 'fieldName' => 'website_type_id',
+ 'sample' => 'Facebook',
+ ),
+ ),
+ 'CRM_Core_DAO_MappingField' => array(
+ array(
+ 'fieldName' => 'website_type_id',
+ 'sample' => 'Facebook',
+ ),
+ ),
);
foreach ($fields as $daoName => $daoFields) {
<comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment>
<add>2.0</add>
<pseudoconstant>
- <name>priority</name>
<optionGroupName>priority</optionGroupName>
</pseudoconstant>
</field>
<comment>Implicit FK to civicrm_option_value.</comment>
<add>2.0</add>
<onDelete>SET NULL</onDelete>
+ <pseudoconstant>
+ <optionGroupName>honor_type</optionGroupName>
+ </pseudoconstant>
</field>
<index>
<name>index_contribution_status</name>
<length>255</length>
<comment>name of the protocol to use for polling (like IMAP, POP3 or Maildir)</comment>
<add>2.2</add>
+ <pseudoconstant>
+ <optionGroupName>mail_protocol</optionGroupName>
+ </pseudoconstant>
</field>
<field>
<name>server</name>
<type>int unsigned</type>
<comment>Mapping Type</comment>
<add>2.1</add>
+ <pseudoconstant>
+ <optionGroupName>mapping_type</optionGroupName>
+ </pseudoconstant>
</field>
<index>
<name>UI_name</name>
<type>int unsigned</type>
<comment>Which type of website does this site belong</comment>
<add>3.2</add>
+ <pseudoconstant>
+ <optionGroupName>website_type</optionGroupName>
+ </pseudoconstant>
</field>
<field>
<name>relationship_type_id</name>
<comment>Which Website type does this website belong to.</comment>
<add>3.2</add>
<pseudoconstant>
- <name>websiteType</name>
<optionGroupName>website_type</optionGroupName>
</pseudoconstant>
</field>
<comment>Implicit FK to civicrm_option_value.</comment>
<add>2.1</add>
<onDelete>SET NULL</onDelete>
+ <pseudoconstant>
+ <optionGroupName>honor_type</optionGroupName>
+ </pseudoconstant>
</field>
<field>
<name>max_reminders</name>