What are Yii helpers?

Member

by sidney , in category: Technology , 4 years ago

What are Yii helpers?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by melvina , 4 years ago

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 Threads:

What are Components in Yii 2 ?
What is the benifits of Yii over other Frameworks ?
What is Active Record(AR) in yii ?
How to get current url in Yii?
Which PHP version is required to install Yii 2.0 ?
What is difference between "render" and "renderpartial" in Yii ?