October\Rain\Database\Traits\SluggableTree

Overview

SluggableTree trait creates structured slugs, called full slugs. Calculating full slugs must be performed externally since it involves expensive lookups. The model is assumed to have two relations defined: parent, children.


Public Methods

public fullSlugAttributes()

public fullSlugAttributes(): void 

fullSlugAttributes calculates full slugs for this model and all other related ones

public getFullSluggableFullSlugColumnName()

public getFullSluggableFullSlugColumnName(): string 

getFullSluggableFullSlugColumnName gets the name of the "fullslug" column.

public getFullSluggableSlugColumnName()

public getFullSluggableSlugColumnName(): string 

getFullSluggableSlugColumnName gets the name of the "slug" column.

Protected Methods

protected getFullSluggableAttributeValue()

protected getFullSluggableAttributeValue($model, $fullslug = ''): void

protected setFullSluggedValue()

protected setFullSluggedValue($model): void

setFullSluggedValue will set the fullslug value on a model