Generating Code with Gii

Starting Gii Generating an Active Record Class Generating CRUD Code Trying it Out Summary This section will describe how to use Gii to automatically generate code that implements some common Web site features. Using Gii to auto-generate code is simply a matter of entering the right information per the instructions shown on the Gii Web pages. Through this tutorial, you will learn how to: enable Gii in your application, use Gii to generate an Active Record class, use Gii to generate the code imp

base\Behavior events()

events() public method Declares event handlers for the $owner's events. Child classes may override this method to declare what PHP callbacks should be attached to the events of the $owner component. The callbacks will be attached to the $owner's events when the behavior is attached to the owner; and they will be detached from the events when the behavior is detached from the component. The callbacks can be any of the following: method in this behavior: 'handleClick', equivalent to [$this, '

caching\FileCache init()

init() public method Initializes this component by ensuring the existence of the cache path. public void init ( )

rest\Serializer $pageCountHeader

$pageCountHeader public property The name of the HTTP header containing the information about total number of pages of data. This is used when serving a resource collection with pagination. public string $pageCountHeader = 'X-Pagination-Page-Count'

console\controllers\FixtureController actionLoad()

actionLoad() public method Loads the specified fixture data. For example, # load the fixture data specified by User and UserProfile. # any existing fixture data will be removed first yii fixture/load "User, UserProfile" # load all available fixtures found under 'tests\unit\fixtures' yii fixture/load "*" # load all fixtures except User and UserProfile yii fixture/load "*, -User, -UserProfile" public integer actionLoad ( array $fixturesInput = [] )$fixturesInput array return integer Re

behaviors\AttributeTypecastBehavior detectAttributeTypes()

detectAttributeTypes() protected method Composes default value for $attributeTypes from the owner validation rules. protected array detectAttributeTypes ( )return array Attribute type map.

redis\Connection $dataTimeout

$dataTimeout public property Timeout to use for redis socket when reading and writing data. If not set the php default value will be used. public float $dataTimeout = null

web\Request $userIP

$userIP public read-only property User IP address, null if not available public string|null getUserIP ( )

gii\generators\model\Generator $generateQuery

$generateQuery public property public $generateQuery = false

base\View endPage()

endPage() public method Marks the ending of a page. public void endPage ( )