return NULL;
}
+ /**
+ * @param null $usedFor
+ * @param bool $excludeHidden
+ *
+ * @return mixed
+ */
function getTree($usedFor = NULL, $excludeHidden = FALSE) {
if (!isset($this->tree)) {
$this->buildTree($usedFor, $excludeHidden);
return $this->tree;
}
+ /**
+ * @param null $usedFor
+ * @param bool $excludeHidden
+ */
function buildTree($usedFor = NULL, $excludeHidden = FALSE) {
$sql = "SELECT civicrm_tag.id, civicrm_tag.parent_id,civicrm_tag.name FROM civicrm_tag ";
}
}
+ /**
+ * @param array $usedFor
+ * @param bool $buildSelect
+ * @param bool $all
+ * @param null $parentId
+ *
+ * @return array
+ */
static function getTagsUsedFor($usedFor = array('civicrm_contact'),
$buildSelect = TRUE,
$all = FALSE,
return $tags;
}
+ /**
+ * @param string $usedFor
+ * @param array $tags
+ * @param null $parentId
+ * @param string $separator
+ *
+ * @return array
+ */
static function getTags($usedFor = 'civicrm_contact',
&$tags = array(),
$parentId = NULL,