references:joomla.framework:application:jcontroller-getviewgetView
Method to get a view object, loading it if required. This method will use the specified name and prefix to construct a view name and attempt to instantiate an object. The class name used for the view is determined by the specified name appended to the specified prefix (whitespace is removed). If the view class has not been defined, the view paths will be searched and the file (if found) will be loaded. The view should be stored in a file with the same name as the view. The extension should be the specified type with .php on the end (i.e. the weblinks view for an HTML document type should be stored in a file called weblinks.html.php). SyntaxJView &getView ( $name, $type, $prefix )
ExamplesExample This method is invoked in the following way: <code php|Example> $view = $this->getView('weblink'); This will load the view class named ‘WeblinksViewWeblink’. This view was found in the file ‘weblink.html.php’. |


