UserAdapter ​
- Type
- Class
- Namespace
- craft\mcp\elements\adapters
- Inherits
- craft\mcp\elements\adapters\UserAdapter » craft\mcp\elements\BaseElementAdapter
- Implements
- craft\mcp\elements\ElementAdapter
- Since
- 5.12.0
Protected Properties ​
| Property | Description |
|---|---|
| elementSerializer | |
| lifecycle |
Public Methods ​
| Method | Description |
|---|---|
| __construct() | |
| canDelete() | |
| canView() | |
| create() | |
| createUnpublishedDraft() | |
| duplicate() | |
| elementType() | |
| fieldSchemaElement() | |
| find() | |
| handle() | |
| listQuery() | |
| prepareValidation() | |
| schema() | |
| serialize() | |
| update() |
__construct() ​
Arguments ​
$elementSerializer$lifecycle$users$editionFeatures
canDelete() ​
Arguments ​
$actor$element
canView() ​
Arguments ​
$actor$element
create() ​
Arguments ​
$attributes$fields$actor
elementType() ​
find() ​
Arguments ​
$id$uid$siteId
handle() ​
listQuery() ​
Arguments ​
$actor
prepareValidation() ​
Arguments ​
$element$attributes$fields$actor
serialize() ​
Arguments ​
$element(craft\elements\User)$fields$summary
update() ​
Arguments ​
$element$attributes$fields$actor
Protected Methods ​
| Method | Description |
|---|---|
| authorizeSave() | |
| createAttributesSchema() | |
| criteriaProperties() | |
| duplicateModes() | |
| fieldSchemaContextSchema() | Returns the JSON Schema for the context that selects a new element's field layout, or null if the type has one field layout. |
| findQuery() | Returns the query find() loads an element with. |
| newElement() | Returns a new, unsaved element. |
| notes() | |
| populate() | Applies validated attributes and custom field values to an element. |
| prepareCreate() | Returns a new element populated with the given values, after authorizing the actor to save it. |
| save() | |
| saveElement() | Saves an element as the acting user and returns the saved element, which may be a new draft. |
| saveFailed() | |
| setFieldValues() | Sets custom field values given in the format elements.field-schema describes. |
| updateAttributesSchema() |
createAttributesSchema() ​
criteriaProperties() ​
notes() ​
updateAttributesSchema() ​
Constants ​
| Constant | Description |
|---|---|
UnrestrictedAttributes | Attributes non-admins may set on any user they are allowed to save. |