What are Yii helpers?

devquora
devquora

Posted On: Feb 22, 2018

 

Helpers are static classes in Yii that simplify common coding tasks, such as string or array manipulations, HTML code generation, and so on.In Yii all helpers are kept under yii\helpers namespace.
You use a helper class in Yii by directly calling one of its static methods, like the following:

use yii\helpers\Html;
echo Html::encode('Test > test');

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Yii 2 Interview Questions

    Which PHP version is required to install Yii 2.0 ?

    Which PHP version is required to install Yii 0 ?..

    Yii 2 Interview Questions

    What is latest version Yii 2 Framework ?

    The latest version of Yii 2 is 2.0.15, released on March 20, 2018...