attach() 공개 메소드

Attach this widget to the passed in view. Normally called by the Ansel_View once this widget is added.
public attach ( Ansel_View_Base $view ) : boolean
$view Ansel_View_Base The view to attach
리턴 boolean
예제 #1
0
파일: Geotag.php 프로젝트: Gomez/horde
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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);
 }
예제 #3
0
 /**
  * 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;
 }