Example #1
0
 /**
  * takes an associative array and creates a entityTag object
  *
  * the function extract all the params it needs to initialize the create a
  * group object. the params array could contain additional unused name/value
  * pairs
  *
  * @param array  $params         (reference ) an assoc array of name/value pairs
  *
  * @return object CRM_Core_BAO_EntityTag object
  * @access public
  * @static
  */
 function add(&$params)
 {
     $dataExists = CRM_Core_BAO_EntityTag::dataExists($params);
     if (!$dataExists) {
         return null;
     }
     $entityTag =& new CRM_Core_BAO_EntityTag();
     $entityTag->copyValues($params);
     $entityTag->save();
     return $entityTag;
 }