/** * Attach widget to supplied view. * * @param Ansel_View_Base $view */ public function attach(Ansel_View_Base $view) { if (empty($GLOBALS['conf']['maps']['driver'])) { return false; } return parent::attach($view); }
/** * Attach widget to supplied view. * * @param Ansel_View_Base $view * * @return boolean */ public function attach(Ansel_View_Base $view) { if (empty($GLOBALS['conf']['faces']['driver'])) { return false; } $GLOBALS['page_output']->addScriptFile('imagefaces.js'); return parent::attach($view); }
/** * Override the parent class' attach method and set the owner in the * title string. * * @param Ansel_View_Base $view The view we are attaching to */ public function attach(Ansel_View_Base $view) { if (parent::attach($view)) { $owner = $this->_view->gallery->getIdentity(); $name = $owner->getValue('fullname'); if (!$name) { $name = $this->_view->gallery->get('owner'); } $this->_title = sprintf(_("%s's Galleries"), $name); } else { return false; } return true; }