hook_domainlinks

Versions
domain
hook_domainlinks($domain)

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.

If you do not provide a link for a specific domain, return FALSE.

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

Code

./API.php, line 161

<?php
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;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List