Skip to content

ElementSerializer ​

Type
Class
Namespace
craft\mcp\public
Inherits
craft\mcp\public\ElementSerializer
Since
5.12.0

View source

Public Methods ​

MethodDescription
__construct()
serialize()
summarize()Returns a summary of an element.

__construct() ​

View source

Arguments ​

  • $serializer

serialize() ​

View source

Arguments ​

  • $element
  • $fields (list<string>, null)
  • $serializeNested (callable, null)
  • $nestedPaths (list<string>)

Returns ​

array<string,mixed>

summarize() ​

Returns a summary of an element.

View source

Arguments ​

Returns ​

array<string,mixed>