Categories

Render()

renderPartial()

renderFile()

render() is commonly used to render a view corresponding to what a user sees as a "page" in your application.
It first renders the view you have specified and then renders the layout for the current controller action (if applicable), placing the result of the first render into the layout. It then performs output processing and finally outputs the result. i.e.) render with a theme.

renderPartial() is commonly used to render a "piece" of a page. The main difference from render() is that this method does not place the render results in a layout.
By default, it also does not perform output processing, but you can override this behavior using the $processOutputparameter. i.e.) render without a theme.

renderFile() is a low-level method that does the grunt work of rendering: it extracts the data variables in the current scope and then runs the view code.
The other two methods internally call this one, but you should practically never need to call it yourself. If you do, keep in mind that you need to pass in a file path (not a view path).

Yii

Yii2

Yii requires PHP 5.2.

Yii 2.0 requires PHP 5.4.0 or higher, which makes use of the latest features of PHP.

In Yii, prefix C was used, and the classes were in global namespaces.

In Yii2, prefix C is not used in namespaces. And classes based on the directory structure.

Yii uses the On-event method, where custom event names are not allowed to use.

In Yii 2.0, any name can be used for the event with a handler attached to it, and event handling can be done using J-query.