You are here

function hook_hosting_automatic_aliases in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 alias/hosting_alias.api.php \hook_hosting_automatic_aliases()

Provide automatic aliases to generate.

See also

hosting_alias_automatic_aliases().

1 function implements hook_hosting_automatic_aliases()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

hosting_alias_hosting_automatic_aliases in alias/hosting_alias.module
Implements hook_hosting_automatic_aliases().
1 invocation of hook_hosting_automatic_aliases()
hosting_alias_automatic_aliases in alias/hosting_alias.module
Generate a default set of aliases for the site based on the global options.

File

alias/hosting_alias.api.php, line 13
Hooks provided by the hosting_alias module.

Code

function hook_hosting_automatic_aliases($url) {
  $aliases = [];

  // Add a couple automatic aliases.
  foreach ([
    'www',
    'web1',
  ] as $subdomain) {
    $aliases[] = $subdomain . '.' . $url;
  }
  return $aliases;
}