Uploading Files

Creating Models Rendering File Input Wiring Up Uploading Multiple Files Uploading files in Yii is usually done with the help of yii\web\UploadedFile which encapsulates each uploaded file as an UploadedFile object. Combined with yii\widgets\ActiveForm and models, you can easily implement a secure file uploading mechanism. Creating Models Like working with plain text inputs, to upload a single file you would create a model class and use an attribute of the model to keep the uploaded file insta

console\Application $enableCoreCommands

$enableCoreCommands public property Whether to enable the commands provided by the core framework. Defaults to true. public boolean $enableCoreCommands = true

helpers\BaseHtml img()

img() public static method Generates an image tag. public static string img ( $src, $options = [] )$src array|string The image URL. This parameter will be processed by yii\helpers\Url::to(). $options array The tag options in terms of name-value pairs. These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using encode(). If a value is null, the corresponding attribute will not be rendered. See renderTagAttributes() for details on how attributes

validators\EmailValidator $allowName

$allowName public property Whether to allow name in the email address (e.g. "John Smith john.smith@example.com"). Defaults to false. See also $fullPattern. public boolean $allowName = false

web\Request getPreferredLanguage()

getPreferredLanguage() public method Returns the user-preferred language that should be used by this application. The language resolution is based on the user preferred languages and the languages supported by the application. The method will try to find the best match. public string getPreferredLanguage ( array $languages = [] )$languages array A list of the languages supported by the application. If this is empty, the current application language will be returned without further proces

db\BatchQueryResult __destruct()

__destruct() public method Destructor. public void __destruct ( )

widgets\Pjax $enableReplaceState

$enableReplaceState public property Whether to enable replace state. public boolean $enableReplaceState = false

widgets\Breadcrumbs $itemTemplate

$itemTemplate public property The template used to render each inactive item in the breadcrumbs. The token {link} will be replaced with the actual HTML link for each inactive item. public string $itemTemplate = "<li>{link}</li>\n"

widgets\Breadcrumbs $encodeLabels

$encodeLabels public property Whether to HTML-encode the link labels. public boolean $encodeLabels = true

widgets\Breadcrumbs $tag

$tag public property The name of the breadcrumb container tag. public string $tag = 'ul'