hook_domainlinks

Definition

hook_domainlinks($domain)
domain/API.php, line 157

Description

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

Namesort iconDescription
Domain hook functionsCore hooks for the Domain module suite.

Code

<?php
function hook_domainlinks($domain) {
  if (user_access('my permission')) {
    $links[] = array(
      'title' => t('settings'),
      'path' => 'admin/build/domain/myaction/'. $domain['domain_id']
    );
    return $links;
  }
}
?>