private $_lastParentlessGroup;
- private $_styleLabels;
-
private $_styleIndent;
private $_alreadyStyled = FALSE;
/**
- * Class constructor.
+ * Get the number of levels of nesting.
*
* @param bool $styleLabels
* @param string $styleIndent
* Id of the group to add the child to.
* @param int $childID
* Id of the new child group.
+ *
+ * @return \CRM_Contact_DAO_GroupNesting
*/
public static function add($parentID, $childID) {
// TODO: Add checks here to make sure invalid nests can't be created
}
/**
- * Removes a child group identified by $childGroupId from the group
- * identified by $groupId; does not delete child group, just the
- * association between the two
+ * Removes a child group from it's parent.
*
* @param $parentID
* The id of the group to remove the child from.
* identified by $groupId; does not delete child group, just the
* association between the two
*
+ * @param int $parentID
+ * The id of the group to remove the child from.
* @param int $childID
* The id of the child group being removed.
*/
* Returns true if the association between parent and child is present,
* false otherwise.
*
- * @param $parentID
+ * @param int $parentID
* The parent id of the association.
- * @param $childID
+ *
+ * @param int $childID
* The child id of the association.
*
* @return bool
* - displaying elements for saving the search
*/
public function buildQuickForm() {
- // get the qill
+ // @todo sync this more with CRM_Group_Form_Edit.
$query = new CRM_Contact_BAO_Query($this->get('queryParams'));
- $qill = $query->qill();
+ $this->assign('qill', $query->qill());
// Values from the search form
$formValues = $this->controller->exportValues();
- // need to save qill for the smarty template
- $this->assign('qill', $qill);
-
// the name and description are actually stored with the group and not the saved search
$this->add('text', 'title', ts('Name'),
CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Group', 'title'), TRUE
$params['id'] = CRM_Contact_BAO_SavedSearch::getName($this->_id, 'id');
}
- $group = CRM_Contact_BAO_Group::create($params);
+ CRM_Contact_BAO_Group::create($params);
// CRM-9464
$this->_id = $savedSearch->id;
);
$groupTypes = CRM_Core_OptionGroup::values('group_type', TRUE);
- $config = CRM_Core_Config::singleton();
+
if (isset($this->_id) && !empty($this->_groupValues['saved_search_id'])) {
unset($groupTypes['Access Control']);
}
}
$params['group_type'] = $groupTypeIds;
- $customFields = CRM_Core_BAO_CustomField::getFields('Group');
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$this->_id,
'Group'