<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Core_BAO_UFJoin extends CRM_Core_DAO_UFJoin {
/**
- * Takes an associative array and creates a uf join object
+ * Takes an associative array and creates a uf join object.
*
- * @param array $params (reference) an assoc array of name/value pairs
+ * @param array $params
+ * (reference) an assoc array of name/value pairs.
*
- * @return CRM_Core_DAO_UFJoin object
- * @static
+ * @return CRM_Core_DAO_UFJoin
*/
public static function &create($params) {
// see if a record exists with the same weight
* @param array $params
*/
public static function deleteAll(&$params) {
- $module = CRM_Utils_Array::value('module', $params);
+ $module = CRM_Utils_Array::value('module', $params);
$entityTable = CRM_Utils_Array::value('entity_table', $params);
- $entityID = CRM_Utils_Array::value('entity_id', $params);
+ $entityID = CRM_Utils_Array::value('entity_id', $params);
if (empty($entityTable) ||
empty($entityID) ||
return;
}
- $dao = new CRM_Core_DAO_UFJoin();
- $dao->module = $module;
+ $dao = new CRM_Core_DAO_UFJoin();
+ $dao->module = $module;
$dao->entity_table = $entityTable;
- $dao->entity_id = $entityID;
+ $dao->entity_id = $entityID;
$dao->delete();
}
* Given an assoc list of params, find if there is a record
* for this set of params
*
- * @param array $params (reference) an assoc array of name/value pairs
+ * @param array $params
+ * (reference) an assoc array of name/value pairs.
*
- * @return int or null
- * @static
+ * @return int
+ * or null
*/
public static function findJoinEntryId(&$params) {
if (!empty($params['id'])) {
* Given an assoc list of params, find if there is a record
* for this set of params and return the group id
*
- * @param array $params (reference) an assoc array of name/value pairs
+ * @param array $params
+ * (reference) an assoc array of name/value pairs.
*
- * @return int or null
- * @static
+ * @return int
+ * or null
*/
public static function findUFGroupId(&$params) {
$dao = new CRM_Core_DAO_UFJoin();
$dao->entity_table = CRM_Utils_Array::value('entity_table', $params);
- $dao->entity_id = CRM_Utils_Array::value('entity_id', $params);
- $dao->weight = CRM_Utils_Array::value('weight', $params);
+ $dao->entity_id = CRM_Utils_Array::value('entity_id', $params);
+ $dao->weight = CRM_Utils_Array::value('weight', $params);
if ($dao->find(TRUE)) {
return $dao->uf_group_id;
}
}
return array($first, $second, $firstActive, $secondActive);
}
+
}