Commit 0d98452c by Carsten Brandt

guide improvement about default values

parent 783d1cca
......@@ -330,6 +330,16 @@ $customer->loadDefaultValues();
// ... render HTML form for $customer ...
```
If you want to set some initial values for the attributes yourself you can override the `init()` method
of the active record class and set the values there. For example to set the default value for the `status` attribute:
```php
public function init()
{
parent::init();
$this->status = 'active';
}
```
Active Record Life Cycles
-------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment