web\User loginRequired()

loginRequired() public method Redirects the user browser to the login page. Before the redirection, the current URL (if it's not an AJAX url) will be kept as $returnUrl so that the user browser may be redirected back to the current page after successful login. Make sure you set $loginUrl so that the user browser can be redirected to the specified login URL after calling this method. Note that when $loginUrl is set, calling this method will NOT terminate the application execution. See also \

authclient\OAuth2 buildAuthUrl()

buildAuthUrl() public method Composes user authorization URL. public string buildAuthUrl ( array $params = [] )$params array Additional auth GET params. return string Authorization URL.

mongodb\file\Upload $document

$document public property Additional file document contents. Common GridFS columns: metadata: array, additional data associated with the file. aliases: array, an array of aliases. contentType: string, content type to be stored with the file. public array $document = []

web\View renderHeadHtml()

renderHeadHtml() protected method Renders the content to be inserted in the head section. The content is rendered using the registered meta tags, link tags, CSS/JS code blocks and files. protected string renderHeadHtml ( )return string The rendered content

BaseYii createObject()

createObject() public static method Creates a new object using the given configuration. You may view this method as an enhanced version of the new operator. The method supports creating an object based on a class name, a configuration array or an anonymous function. Below are some usage examples: // create an object using a class name $object = Yii::createObject('yii\db\Connection'); // create an object using a configuration array $object = Yii::createObject([ 'class' => 'yii\db\Con

web\Session setName()

setName() public method Sets the name for the current session. This is a wrapper for PHP session_name(). public void setName ( $value )$value string The session name for the current session, must be an alphanumeric string. It defaults to "PHPSESSID".

gii\generators\extension\Generator attributeLabels()

attributeLabels() public method Returns the attribute labels. Attribute labels are mainly used for display purpose. For example, given an attribute firstName, we can declare a label First Name which is more user-friendly and can be displayed to end users. By default an attribute label is generated using generateAttributeLabel(). This method allows you to explicitly specify attribute labels. Note, in order to inherit labels defined in the parent class, a child class needs to merge the parent

caching\Cache mset()

mset() public method Stores multiple items in cache. Each item contains a value identified by a key. If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones, respectively. public boolean mset ( $items, $duration = 0, $dependency = null )$items array The items to be cached, as key-value pairs. $duration integer Default number of seconds in which the cached values will expire. 0 means never expire. $dependency yii\caching\Depen

mongodb\QueryBuilder listDatabases()

listDatabases() public method Generates 'listDatabases' command. public array listDatabases ( $condition = [], $options = [] )$condition array Filter condition. $options array Command options. return array Command document.

db\Migration getDb()

getDb() protected method (available since version 2.0.6) protected void getDb ( )