function hook_domainlinks in Domain Access 5
Same name and namespace in other branches
- 6.2 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.
Related topics
3 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_conf_domainlinks in domain_conf/
domain_conf.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 157 - API documentation file.
Code
function hook_domainlinks($domain) {
if (user_access('my permission')) {
$links[] = array(
'title' => t('settings'),
'path' => 'admin/build/domain/myaction/' . $domain['domain_id'],
);
return $links;
}
}