| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
$this->valid() &&
!$this->_alreadyStyled
) {
- $styledGroup = clone($this->_current);
+ $styledGroup = clone($this->_current);
$nestingLevel = $this->getCurrentNestingLevel();
- $indent = '';
+ $indent = '';
while ($nestingLevel--) {
$indent .= $this->_styleIndent;
}
*/
public function _getNextParentlessGroup(&$group = NULL) {
$lastParentlessGroup = $this->_lastParentlessGroup;
- $nextGroup = new CRM_Contact_BAO_Group();
+ $nextGroup = new CRM_Contact_BAO_Group();
$nextGroup->order_by = 'title ' . self::$_sortOrder;
$nextGroup->find();
if ($group == NULL) {
}
else {
/* if we get here, it could be because we're out of siblings
- * (in which case we return null) or because we're at the
- * top level groups which do not have parents but may still
- * have siblings, so check for that first.
- */
+ * (in which case we return null) or because we're at the
+ * top level groups which do not have parents but may still
+ * have siblings, so check for that first.
+ */
$nextGroup = $this->_getNextParentlessGroup($group);
if ($nextGroup) {
* @param $childID
* The child id of the association.
*
- * @return boolean
+ * @return bool
* True if association is found, false otherwise.
*/
public static function isParentChild($parentID, $childID) {
* @param $groupId
* The id of the group to check for child groups.
*
- * @return boolean
+ * @return bool
* True if 1 or more child groups are found, false otherwise.
*/
public static function hasChildGroups($groupId) {
* @param $groupId
* The id of the group to check for parent groups.
*
- * @return boolean
+ * @return bool
* True if 1 or more parent groups are found, false otherwise.
*/
public static function hasParentGroups($groupId) {
* @param $checkGroupId
* The group id to check if it is a parent of the $groupIds group(s).
*
- * @return boolean
+ * @return bool
* True if $checkGroupId points to a group that is a parent of one of the $groupIds groups, false otherwise.
*/
public static function isParentGroup($groupIds, $checkGroupId) {
$parentGroupId = $dao->parent_group_id;
if ($parentGroupId == $checkGroupId) {
/* print "One of these: <pre>";
- print_r($groupIds);
- print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
+ print_r($groupIds);
+ print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
return TRUE;
}
* @param $checkGroupId
* The group id to check if it is a child of the $groupIds group(s).
*
- * @return boolean
+ * @return bool
* True if $checkGroupId points to a group that is a child of one of the $groupIds groups, false otherwise.
*/
public static function isChildGroup($groupIds, $checkGroupId) {
$childGroupId = $dao->child_group_id;
if ($childGroupId == $checkGroupId) {
/* print "One of these: <pre>";
- print_r($groupIds);
- print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
+ print_r($groupIds);
+ print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
return TRUE;
}
* @param $checkGroupId
* The group id to check if it is an ancestor of the $groupIds group(s).
*
- * @return boolean
+ * @return bool
* True if $checkGroupId points to a group that is an ancestor of one of the $groupIds groups, false otherwise.
*/
public static function isAncestorGroup($groupIds, $checkGroupId) {
$parentGroupId = $dao->parent_group_id;
if ($parentGroupId == $checkGroupId) {
/* print "One of these: <pre>";
- print_r($groupIds);
- print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
+ print_r($groupIds);
+ print "</pre> has groupId $checkGroupId as an ancestor.<br/>"; */
return TRUE;
}
* @param $checkGroupId
* The group id to check if it is a descendent of the $groupIds group(s).
*
- * @return boolean
+ * @return bool
* True if $checkGroupId points to a group that is a descendent of one of the $groupIds groups, false otherwise.
*/
public static function isDescendentGroup($groupIds, $checkGroupId) {
$childGroupId = $dao->child_group_id;
if ($childGroupId == $checkGroupId) {
/* print "One of these: <pre>";
- print_r($groupIds);
- print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
+ print_r($groupIds);
+ print "</pre> has groupId $checkGroupId as a descendent.<br/><br/>"; */
return TRUE;
}
return $containingGroups;
}
+
}