Yii2 has several built-in helper classes to streamline common coding tasks, such as HTML, array, and JSON manipulation. These helper functions take the form of static classes (which means that they should be called statically rather than being instantiated) and live underneath the
\yii\helpers namespace. In this section, we'll go over several of the more common helpers.
Comprehensive documentation for all helpers Yii2 supports can be found on the Yii2 API documentation page underneath the helpers section at http://www.yiiframework.com/doc-2.0/.
The first helper commonly used in Yii2 is the URL helper. The URL helper helps us retrieve specific URLs, such as the base and home URL, and generate URL routes to specific paths. ...