Skip to content

Structures ​

Type
Class
Namespace
craft\mcp\capabilities
Inherits
craft\mcp\capabilities\Structures
Since
5.12.0

View source

Public Methods ​

MethodDescription
__construct()
moveElement()

__construct() ​

View source

Arguments ​

  • $elements
  • $elementQueries
  • $elementSerializer
  • $actor
  • $structures

moveElement() ​

View source

Arguments ​

  • $elementType (string) – Registered element reference handle or PHP class; see craft://element-types and info.get.
  • $operation (string) – Move to the start or end of the root, or before or after a target element.
  • $structureId (integer, null) – Structure ID. It may be inferred when the element belongs to exactly one structure.
  • $elementId (integer, null) – Element ID.
  • $elementUid (string, null) – Element UID.
  • $targetElementId (integer, null) – Target element ID for before or after operations.
  • $targetElementUid (string, null) – Target element UID for before or after operations.
  • $siteId (integer, null) – Site ID used to load the elements.
  • $mode

Returns ​

array{moved: true, operation: string, structureId: int, element: array<string,mixed>}

Constants ​

ConstantDescription
Operations