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

mongodb\file\Cursor getId()

getId() public method Returns the ID for this cursor. public \MongoDB\Driver\CursorId getId ( )return \MongoDB\Driver\CursorId Cursor ID.

codeception\TestCase setUp()

setUp() protected method protected void setUp ( )

jui\Widget registerClientOptions()

registerClientOptions() protected method Registers a specific jQuery UI widget options protected void registerClientOptions ( $name, $id )$name string The name of the jQuery UI widget $id string The ID of the widget

debug\panels\ConfigPanel $name

$name public read-only property Name of the panel public string getName ( )

rbac\PhpManager hasChild()

hasChild() public method Returns a value indicating whether the child already exists for the parent. public boolean hasChild ( $parent, $child )$parent yii\rbac\Item $child yii\rbac\Item return boolean Whether $child is already a child of $parent

web\UrlManager $baseUrl

$baseUrl public property The base URL that is used by createUrl() to prepend to created URLs. public string getBaseUrl ( )public void setBaseUrl ( $value )

grid\ActionColumn createUrl()

createUrl() public method Creates a URL for the given action and model. This method is called for each button and each row. public string createUrl ( $action, $model, $key, $index )$action string The button name (or action ID) $model yii\db\ActiveRecord The data model $key mixed The key associated with the data model $index integer The current row index return string The created URL

validators\Validator addError()

addError() public method Adds an error about the specified attribute to the model object. This is a helper method that performs message selection and internationalization. public void addError ( $model, $attribute, $message, $params = [] )$model yii\base\Model The data model being validated $attribute string The attribute being validated $message string The error message $params array Values for the placeholders in the error message

web\UrlManager addRules()

addRules() public method Adds additional URL rules. This method will call buildRules() to parse the given rule declarations and then append or insert them to the existing $rules. Note that if $enablePrettyUrl is false, this method will do nothing. public void addRules ( $rules, $append = true )$rules array The new rules to be added. Each array element represents a single rule declaration. Please refer to $rules for the acceptable rule format. $append boolean Whether to add the new rule