| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
parent::__construct();
}
/**
- * Fetch object based on array of properties
+ * Fetch object based on array of properties.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return array
*/
- public static function getTagsUsedFor($usedFor = array(
- 'civicrm_contact'
- ),
- $buildSelect = TRUE,
- $all = FALSE,
- $parentId = NULL
+ public static function getTagsUsedFor(
+ $usedFor = array('civicrm_contact'),
+ $buildSelect = TRUE,
+ $all = FALSE,
+ $parentId = NULL
) {
$tags = array();
}
/**
- * Function to retrieve tags
+ * Function to retrieve tags.
*
* @param string $usedFor
* Which type of tag entity.
*
* @return array
*/
- static function getTags(
+ public static function getTags(
$usedFor = 'civicrm_contact',
&$tags = array(),
$parentId = NULL,
}
/**
- * Delete the tag
+ * Delete the tag.
*
* @param int $id
* Tag id.
*
- * @return boolean
+ * @return bool
*/
public static function del($id) {
// since this is a destructive operation, lets make sure
}
/**
- * Takes an associative array and creates a contact object
+ * Takes an associative array and creates a contact object.
*
* The function extract all the params it needs to initialize the create a
* contact object. the params array could contain additional unused name/value
}
/**
- * Check if there is data to create the object
+ * Check if there is data to create the object.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
- * @return boolean
+ * @return bool
*/
public static function dataExists(&$params) {
// Disallow empty values except for the number zero.
}
/**
- * Get the tag sets for a entity object
+ * Get the tag sets for a entity object.
*
* @param string $entityTable
* Entity_table.
$dao = CRM_Core_DAO::executeQuery($query, array(
1 => array(
'%' . $entityTable . '%',
- 'String'
- )
+ 'String',
+ ),
), TRUE, NULL, FALSE, FALSE);
while ($dao->fetch()) {
$tagSets[$dao->id] = $dao->name;
return $tags;
}
+
}