function hook_domainlinks in Domain Access 6.2
Same name and namespace in other branches
- 5 API.php \hook_domainlinks()
- 7.2 domain.api.php \hook_domainlinks()
Returns links to additional functions for the Domain Access module's admin screen
Note that if your page requires a user_access check other than 'administer domains' you should explictly check permissions before returning the array.
Parameters
$domain: An array of data for the active domain, taken from the {domain} table.
- domain_id -- the unique identifier of this domain
- subdomain -- the host path of the url for this domain
- sitename -- the human-readable name of this domain
Return value
An array of links to append to the admin screen, in the format:
- title -- the link title
- path -- the link path (a Drupal-formatted path)
The data returned by this function will be passed through the l() function.
If you do not provide a link for a specific domain, return FALSE.
Related topics
5 functions implement hook_domainlinks()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_alias_domainlinks in domain_alias/
domain_alias.module - Implement hook_domainlinks()
- domain_conf_domainlinks in domain_conf/
domain_conf.module - Implement hook_domainlinks()
- domain_content_domainlinks in domain_content/
domain_content.module - Implement hook_domainlinks()
- domain_prefix_domainlinks in domain_prefix/
domain_prefix.module - Implement hook_domainlinks()
- domain_theme_domainlinks in domain_theme/
domain_theme.module - Implement hook_domainlinks()
1 invocation of hook_domainlinks()
- domain_view in ./
domain.admin.inc - The main administration page, a list of active domains.
File
- ./
API.php, line 161 - API documentation file.
Code
function hook_domainlinks($domain) {
// These actions do not apply to the primary domain.
if (user_access('my permission') && $domain['domain_id'] > 0) {
$links[] = array(
'title' => t('settings'),
'path' => 'admin/build/domain/myaction/' . $domain['domain_id'],
);
return $links;
}
return FALSE;
}