gyro/modules/ajax/view/base/ajaxviewfactory.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Overload View Factory to create AjaxView 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Ajax 00007 */ 00008 class ViewFactoryAjax extends ViewFactoryBase { 00009 const AJAX = 'AJAX'; 00010 00011 /** 00012 * Create a suitable view 00013 * 00014 * @param string $type The type of view to create e.g. "page", or "content", or "XML" ... 00015 * @param string $template_name Name of the template 00016 * @param mixed $params Params to pass to view, may depend on type 00017 * @return IView 00018 */ 00019 public function create_view($type, $template_name, $params) { 00020 if ($type == self::AJAX) { 00021 return new AjaxView($params); 00022 } 00023 return parent::create_view($type, $template_name, $params); 00024 } 00025 } 00026 ?>