Example #1
0
 /**
  * Constructs a new view.
  *
  * @param string $name the name of this view
  * @param string $format the format name
  * @param Controller $controller the controller object of this view's module
  */
 public function __construct($name, $format, Controller $controller)
 {
     $this->name = $name;
     $this->format = $format;
     $this->controller = $controller;
     $this->module = $controller->getModule();
     $this->parent = $controller->getParent();
     $this->mainTemplate = 'main.' . $format;
 }
Example #2
0
 /**
  * Returns the module name of this model.
  *
  * @return string the module name
  */
 protected function getModule()
 {
     return $this->controller->getModule();
 }