/**
* Get the domain BAO
*
+ * @param null $reset
+ *
* @return null|object CRM_Core_BAO_Domain
* @access public
* @static
* Reset domain to default (ie. as loaded from settings). This is the
* counterpart to CRM_Core_BAO_Domain::setDomain.
*
- * @param integer $domainID id for domain you want to set as current
+ * @internal param int $domainID id for domain you want to set as current
* @deprecated
* @see CRM_Core_BAO_Domain::setDomain
*/
CRM_Core_Config::singleton(TRUE, TRUE);
}
+ /**
+ * @param bool $skipUsingCache
+ *
+ * @return null|string
+ */
static function version( $skipUsingCache = false ) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain',
CRM_Core_Config::domainID(),
/**
* Save the values of a domain
*
+ * @param $params
+ * @param $id
+ *
* @return domain array
* @access public
*/
/**
* Create a new domain
*
+ * @param $params
+ *
* @return domain array
* @access public
*/
return $domain;
}
+ /**
+ * @return bool
+ */
static function multipleDomains() {
$session = CRM_Core_Session::singleton();
return $numberDomains > 1 ? TRUE : FALSE;
}
+ /**
+ * @param bool $skipFatal
+ *
+ * @return array name & email for domain
+ * @throws Exception
+ */
static function getNameAndEmail($skipFatal = FALSE) {
$fromEmailAddress = CRM_Core_OptionGroup::values('from_email_address', NULL, NULL, NULL, ' AND is_default = 1');
if (!empty($fromEmailAddress)) {
CRM_Core_Error::fatal($status);
}
+ /**
+ * @param $contactID
+ *
+ * @return bool|null|object|string
+ */
static function addContactToDomainGroup($contactID) {
$groupID = self::getGroupId();
return FALSE;
}
+ /**
+ * @return bool|null|object|string
+ */
static function getGroupId() {
static $groupID = NULL;
return $groupID ? $groupID : FALSE;
}
+ /**
+ * @param $groupId
+ *
+ * @return bool
+ */
static function isDomainGroup($groupId) {
$domainGroupID = self::getGroupId();
return $domainGroupID == $groupId ? TRUE : FALSE;
}
+ /**
+ * @return array
+ */
static function getChildGroupIds() {
$domainGroupID = self::getGroupId();
$childGrps = array();
}
// function to retrieve a list of contact-ids that belongs to current domain/site.
+ /**
+ * @return array
+ */
static function getContactList() {
$siteGroups = CRM_Core_BAO_Domain::getChildGroupIds();
$siteContacts = array();