Skip to content

Instantly share code, notes, and snippets.

@cpatrick
Created August 2, 2012 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpatrick/3237508 to your computer and use it in GitHub Desktop.
Save cpatrick/3237508 to your computer and use it in GitHub Desktop.
Annio Notification
<?php
/*=========================================================================
MIDAS Server
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
69328 Lyon, FRANCE.
See Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
require_once BASE_PATH . '/modules/api/library/APIEnabledNotification.php';
class Annio_Notification extends ApiEnabled_Notification
{
public $moduleName = 'annio';
public $_moduleComponents = array('Api');
public $_models = array();
/** init notification process*/
public function init()
{
// This activates the function when the header is loaded and places
// its output into the head tag.
$this->addCallBack('CALLBACK_CORE_GET_FOOTER_HEADER', 'getHeader');
$this->enableWebAPI($this->moduleName);
}//end init
/**
* We use a callback to add the lines to core that we need for view
* customization.
*/
public function getHeader()
{
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
$cssPath = $baseUrl.'/modules/'.$this->moduleName.'/public/css/custom.layout.css';
$cssHtml = '<link type="text/css" rel="stylesheet" href="'.$cssPath.'">';
return $cssHtml;
}
} //end class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment