Skip to content

EntryTypes ​

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

View source

Public Methods ​

MethodDescription
__construct()
create()
delete()
fieldLayoutResourceByIdentifier()
get()
list()
resource()
resourceByIdentifier()
update()

__construct() ​

View source

Arguments ​

  • $entryTypes
  • $fieldLayouts

create() ​

View source

Arguments ​

  • $name
  • $handle
  • $description
  • $icon
  • $color
  • $uiLabelFormat
  • $titleFormat
  • $titleTranslationMethod
  • $titleTranslationKeyFormat
  • $allowLineBreaksInTitles
  • $showSlugField
  • $slugTranslationMethod
  • $slugTranslationKeyFormat
  • $showStatusField
  • $fieldLayout (array<string,mixed>, null) – Native Craft field layout config.

Returns ​

array{entryType: array<string,mixed>}

delete() ​

View source

Arguments ​

  • $id
  • $uid
  • $handle

Returns ​

array{deleted: true}

fieldLayoutResourceByIdentifier() ​

View source

Arguments ​

  • $entryType

Returns ​

array{fieldLayout: array<string,mixed>}

get() ​

View source

Arguments ​

  • $id
  • $uid
  • $handle

Returns ​

array{entryType: array<string,mixed>}

list() ​

View source

Returns ​

array{count: int, entryTypes: list<array<string,mixed>>}

resource() ​

View source

Returns ​

array{count: int, entryTypes: list<array<string,mixed>>}

resourceByIdentifier() ​

View source

Arguments ​

  • $entryType

Returns ​

array{entryType: array<string,mixed>}

update() ​

View source

Arguments ​

  • $context
  • $id
  • $uid
  • $currentHandle (string, null) – Existing entry type handle.
  • $name
  • $handle
  • $description
  • $icon
  • $color
  • $uiLabelFormat
  • $titleFormat
  • $titleTranslationMethod
  • $titleTranslationKeyFormat
  • $allowLineBreaksInTitles
  • $showSlugField
  • $slugTranslationMethod
  • $slugTranslationKeyFormat
  • $showStatusField
  • $fieldLayout (array<string,mixed>, null) – Native Craft field layout config.

Returns ​

array{entryType: array<string,mixed>}