예제 #1
0
파일: PageMenu.php 프로젝트: jurasm2/bubo
 public function __construct($parent, $name, $lang = NULL)
 {
     parent::__construct($parent, $name);
     $this->lang = $lang;
     $this->renderer = new Rendering\PageMenuRenderer();
     $this->cachingEnabled = TRUE;
 }
예제 #2
0
 public function initTemplate($templateFile)
 {
     $template = parent::initTemplate($templateFile);
     $template->contextMenuListenerId = $this->contextMenuListenerId;
     $template->name = $this->name;
     return $template;
 }
예제 #3
0
파일: Media.php 프로젝트: jurasm2/bubo
 /**
  * Generic factory for first order media subcomponents
  * @param string $name
  * @return mixed
  */
 public function createComponent($name)
 {
     $nsClassName = 'Bubo\\Media\\Components\\' . ucfirst($name);
     if (class_exists($nsClassName)) {
         return new $nsClassName($this, $name);
     }
     return parent::createComponent($name);
 }
예제 #4
0
파일: PopUp.php 프로젝트: jurasm2/bubo
 /**
  * Generic factory for popup forms
  * @param string $name
  * @return mixed
  */
 public function createComponent($name)
 {
     if (preg_match('([a-zA-Z0-9]+Form)', $name)) {
         // detect section
         $classname = "Bubo\\Media\\Components\\Content\\PopUp\\" . ucfirst($name);
         if (class_exists($classname)) {
             $form = new $classname($this, $name);
             //$section->setTranslator($this->presenter->context->translator);
             return $form;
         }
     }
     return parent::createComponent($name);
 }
예제 #5
0
 public function __construct($parent, $name)
 {
     parent::__construct($parent, $name);
 }
예제 #6
0
 /**
  * Getter for properties prefixed with "_"
  * @param type $name
  * @return null
  */
 public function &__get($name)
 {
     if ($name != 'presenter') {
         //dump($name);
         if (preg_match('#\\_(.+)#', $name, $matches)) {
             $retVal = $this->__call_or_get($name, NULL, $matches);
             return $retVal;
         }
     }
     return parent::__get($name);
 }