<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
/**
* takes an associative array and creates a address
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param boolean $fixAddress true if you need to fix (format) address values
+ * @param array $params (reference ) an assoc array of name/value pairs
+ * @param boolean $fixAddress true if you need to fix (format) address values
* before inserting in db
*
+ * @param null $entity
+ *
* @return array $blocks array of created address
* @access public
* @static
*/
- static function create(&$params, $fixAddress, $entity = NULL) {
+ static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
if (!isset($params['address']) || !is_array($params['address'])) {
return;
}
* Given the list of params in the params array, fetch the object
* and store the values in the values array
*
- * @param array $entityBlock associated array of fields
- * @param boolean $microformat if microformat output is required
- * @param int $fieldName conditional field name
+ * @param array $entityBlock associated array of fields
+ * @param boolean $microformat if microformat output is required
+ * @param int|string $fieldName conditional field name
*
* @return array $addresses array with address fields
* @access public
$params['condition'] = 'state_province_id IN (' . implode(',', (array) $props['state_province_id']) . ')';
}
break;
+ // Not a real field in this entity
+ case 'world_region':
+ return CRM_Core_PseudoConstant::worldRegion();
+ break;
}
return CRM_Core_PseudoConstant::get(__CLASS__, $fieldName, $params, $context);
}