class ReorderElements (View source)

Properties

protected BaseElement $element

Methods

public
__construct(BaseElement $element)

Create reordering service for specified Element

public
getElement()

Get the Element reordering will be performed on

public
$this
setElement(BaseElement $element)

Set the Element instance to perform reordering on

public
reorder(int $elementToBeAfterID = 0)

Set the ordering of Elements in relation to sibling Elements in the parent {ElementalArea}.

public
publishSortOrder()

Force live sort order to match stage sort order

Details

__construct(BaseElement $element)

Create reordering service for specified Element

Parameters

BaseElement $element

BaseElement getElement()

Get the Element reordering will be performed on

Return Value

BaseElement

$this setElement(BaseElement $element)

Set the Element instance to perform reordering on

Parameters

BaseElement $element

Return Value

$this

reorder(int $elementToBeAfterID = 0)

Set the ordering of Elements in relation to sibling Elements in the parent {ElementalArea}.

This only affects the sort order in draft.

Parameters

int $elementToBeAfterID

ID of the Element to be ordered after

publishSortOrder()

Force live sort order to match stage sort order