示例#1
0
 /**
  * Sets the default view to the comment views.
  *
  * @param stirng $view
  *
  * @return ComBaseControllerComment
  */
 public function setView($view)
 {
     parent::setView($view);
     if (!$this->_view instanceof LibBaseViewAbstract) {
         $view = KInflector::isPlural($view) ? 'comments' : 'comment';
         $defaults[] = 'ComBaseView' . ucfirst($view) . ucfirst($this->_view->name);
         register_default(array('identifier' => $this->_view, 'default' => $defaults));
     }
     return $this;
 }