Backend\Behaviors\RelationController\HasManageMode

Overview

HasManageMode contains logic for managing related records


Protected Properties

protected ListWidget|null $manageListWidget

manageListWidget used for managing as a list

protected FormWidget|null $manageFormWidget

manageFormWidget used for managing as a form

protected Model $manageModel

manageModel is a reference to the model used for manage form

protected Backend\Widgets\Filter $manageFilterWidget

protected string $manageTitle

manageTitle used for the manage popup

protected string $manageMode

manageMode of relation as list, form, or pivot

protected int $manageId

manageId is the primary id of an existing relation record


Public Methods

public onRelationManageAdd()

public onRelationManageAdd(): void

onRelationManageAdd an existing related model to the primary model

public onRelationManageCreate()

public onRelationManageCreate(): void

onRelationManageCreate a new related model

public onRelationManageDelete()

public onRelationManageDelete(): void

onRelationManageDelete an existing related model completely

public onRelationManageForm()

public onRelationManageForm(): void

public onRelationManageRemove()

public onRelationManageRemove(): void

onRelationManageRemove an existing related model from the primary model

public onRelationManageUpdate()

public onRelationManageUpdate(): void

onRelationManageUpdate an existing related model's fields

public relationGetManageFormWidget()

public relationGetManageFormWidget(): Backend\Widgets\Form|null 

relationGetManageFormWidget returns the manage form widget used by this behavior

public relationGetManageListWidget()

public relationGetManageListWidget(): Backend\Widgets\Lists|null 

relationGetManageListWidget returns the manage list widget used by this behavior

public relationGetManageWidget()

public relationGetManageWidget(): Backend\Classes\WidgetBase 

relationGetManageWidget returns the manage widget used by this behavior

Protected Methods

protected evalManageMode()

protected evalManageMode(): string 

evalManageMode determines the management mode based on the relation type and settings

protected evalManageTitle()

protected evalManageTitle(): string 

evalManageTitle determines the management mode popup title

protected makeManageFormWidget()

protected makeManageFormWidget(): Backend\Widgets\Form|null 

makeManageFormWidget prepares the form widget for management

protected makeManageListWidget()

protected makeManageListWidget(): Backend\Widgets\Lists|null 

makeManageListWidget prepares the list widget for management