-
Sebastian Paul authoredSebastian Paul authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
unity_api.module 825 B
<?php
/**
* @file Unity Api Integration module.
*/
/**
* call hooks to build the links.
* @return
* array with links from called hooks
*/
function unity_api_generate_links_array() {
$links = module_invoke_all('unity_api_addlinks');
return ($links);
}
/**
* Insert Javascript into the page.
*/
function unity_api_page_alter(&$page) {
global $_domain;
dsm($_domain);
dsm(drupal_get_title());
$faviconurl = file_create_url(theme_get_setting('favicon_path', variable_get('theme_default')));
$my_settings = array(
'sitename' => drupal_get_title(),
'links' => unity_api_generate_links_array(),
'favicon' => $faviconurl,
'baseurl' => "dev.d7",
);
// TODO: drupal_alter to allow other modules to alter the output.
drupal_add_js(array('unity_api' => $my_settings), 'setting');
}