PHP Class SluggableBehavior

Inheritance: extends ModelBehavior
ファイルを表示 Open project: mintao/yii-behavior-sluggable

Protected Properties

Property Type Description
$_defaultColumnsToCheck Default columns to build slug if none given

Public Methods

Method Description
beforeSave ( CModelEvent $event ) beforeSave
getColumns ( ) : array
getSlugColumn ( ) : string
getToLower ( ) : boolean
getUnique ( ) : boolean
getUpdate ( ) : boolean
getUseInflector ( ) : boolean
setColumns ( array $columns )
setSlugColumn ( string $slugColumn )
setToLower ( boolean $toLower )
setUnique ( boolean $unique )
setUpdate ( boolean $update )
setUseInflector ( boolean $useInflector )

Private Methods

Method Description
simpleSlug ( string $str ) : string Create a simple slug by just replacing white spaces

Method Details

beforeSave() public method

beforeSave
public beforeSave ( CModelEvent $event )
$event CModelEvent

getColumns() public method

public getColumns ( ) : array
return array

getSlugColumn() public method

public getSlugColumn ( ) : string
return string

getToLower() public method

public getToLower ( ) : boolean
return boolean

getUnique() public method

public getUnique ( ) : boolean
return boolean

getUpdate() public method

public getUpdate ( ) : boolean
return boolean

getUseInflector() public method

public getUseInflector ( ) : boolean
return boolean

setColumns() public method

public setColumns ( array $columns )
$columns array

setSlugColumn() public method

public setSlugColumn ( string $slugColumn )
$slugColumn string

setToLower() public method

public setToLower ( boolean $toLower )
$toLower boolean

setUnique() public method

public setUnique ( boolean $unique )
$unique boolean

setUpdate() public method

public setUpdate ( boolean $update )
$update boolean

setUseInflector() public method

public setUseInflector ( boolean $useInflector )
$useInflector boolean

Property Details

$_defaultColumnsToCheck protected_oe property

Default columns to build slug if none given
protected $_defaultColumnsToCheck