If Orm_Behaviour_Virtualname::$unique is set, ->save() method can throw an Exception if slug already in use.
Required. Column used to store the slug.
true, false or 'context' if uniqueness must be checked by context.
Returns: | Item slug. |
---|
Parameters: |
|
---|---|
Returns: | A clean slug, lowercase, without forbidden characters. |
<?php
class Model_Monkey extends \Nos\Orm\Model
{
protected static $_behaviours = array(
'Nos\Orm_Behaviour_Virtualname' => array(
'events' => array('before_save', 'after_save'),
'virtual_name_property' => 'monk_virtual_name',
),
);
}