helpers\Inflector

All Classes | Properties | Methods | Constants Inheritance yii\helpers\Inflector » yii\helpers\BaseInflector Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/Inflector.php Inflector pluralizes and singularizes English nouns. It also contains some other useful methods. Public Properties Property Type Description Defined By $plurals array The rules for converting a word into its plural form. yii\helpers\BaseInflector $singulars array Th

helpers\HtmlPurifier

All Classes | Methods Inheritance yii\helpers\HtmlPurifier » yii\helpers\BaseHtmlPurifier Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/HtmlPurifier.php HtmlPurifier provides an ability to clean up HTML from any harmful code. Basic usage is the following: echo HtmlPurifier::process($html); If you want to configure it: echo HtmlPurifier::process($html, [ 'Attr.EnableID' => true, ]); For more details please refer to HTMLPurif

helpers\Html

All Classes | Properties | Methods Inheritance yii\helpers\Html » yii\helpers\BaseHtml Subclasses yii\bootstrap\BaseHtml, yii\bootstrap\Html Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/Html.php Html provides a set of static methods for generating commonly used HTML tags. Nearly all of the methods in this class allow setting additional html attributes for the html tags they generate. You can specify for example. 'class', 'style'

helpers\FormatConverter

All Classes | Properties | Methods Inheritance yii\helpers\FormatConverter » yii\helpers\BaseFormatConverter Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/FormatConverter.php FormatConverter provides functionality to convert between different formatting pattern formats. It provides functions to convert date format patterns between different conventions. Public Properties Property Type Description Defined By $juiFallbackDatePatterns

helpers\FileHelper

All Classes | Properties | Methods | Constants Inheritance yii\helpers\FileHelper » yii\helpers\BaseFileHelper Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/FileHelper.php File system helper Public Properties Property Type Description Defined By $mimeMagicFile string The path (or alias) of a PHP file containing MIME type information. yii\helpers\BaseFileHelper Public Methods Method Description Defined By copyDirectory() Copies a

helpers\Console

All Classes | Methods | Constants Inheritance yii\helpers\Console » yii\helpers\BaseConsole Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/Console.php Console helper provides useful methods for command line related tasks such as getting input or formatting and coloring output. Public Methods Method Description Defined By ansiFormat() Will return a string formatted with the given ANSI style yii\helpers\BaseConsole ansiFormatCode() Re

helpers\BaseVarDumper export()

export() public static method Exports a variable as a string representation. The string is a valid PHP expression that can be evaluated by PHP parser and the evaluation result will give back the variable value. This method is similar to var_export(). The main difference is that it generates more compact string representation using short array syntax. It also handles objects by using the PHP functions serialize() and unserialize(). PHP 5.4 or above is required to parse the exported value.

helpers\BaseVarDumper dumpAsString()

dumpAsString() public static method Dumps a variable in terms of a string. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers. public static string dumpAsString ( $var, $depth = 10, $highlight = false )$var mixed Variable to be dumped $depth integer Maximum depth that the dumper should go into the variable. Defaults to 10. $highlight boolean Whether the result should be syntax-highlighted re

helpers\BaseVarDumper dump()

dump() public static method Displays a variable. This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers. public static void dump ( $var, $depth = 10, $highlight = false )$var mixed Variable to be dumped $depth integer Maximum depth that the dumper should go into the variable. Defaults to 10. $highlight boolean Whether the result should be syntax-highlighted

helpers\BaseUrl toRoute()

toRoute() public static method Creates a URL for the given route. This method will use yii\web\UrlManager to create a URL. You may specify the route as a string, e.g., site/index. You may also use an array if you want to specify additional query parameters for the URL being created. The array format must be: // generates: /index.php?r=site/index&param1=value1&param2=value2 ['site/index', 'param1' => 'value1', 'param2' => 'value2'] If you want to create a URL with an anchor, y