class UserResource extends AbstractDatabaseResource
Traits
Properties
| protected JsonApi | $api | from Bootable |
|
|
| protected Dispatcher | $events | from Bootable |
|
|
| protected Factory | $validation | from Bootable |
|
|
| static protected array | $endpointModifiers | from Extendable |
|
|
| static protected array | $fieldModifiers | from Extendable |
|
|
| static protected array | $sortModifiers | from Extendable |
|
|
| protected array|null | $cachedEndpoints | from Extendable |
|
|
| protected array|null | $cachedFields | from Extendable |
|
|
| protected array|null | $cachedSorts | from Extendable |
|
Methods
Called by the JSON:API server package to resolve the validation factory.
No description
No description
Whether the id can be a key of the model. An integer key only matches digits: databases treat anything else differently (MySQL reads "2abc" as 2, PostgreSQL rejects the query), so it is answered as not found.
No description
No description
Get the model property that a field represents.
Get the model method that a field represents.
No description
No description
Resolve a hostname (or accept a literal IP) and return the first address that is safe to connect to, or null if the host is unresolvable or only resolves to blocked (link-local / loopback / reserved) addresses.
Details
Factory
validationFactory()
Called by the JSON:API server package to resolve the validation factory.
in Extendable
at
line 22
static void
mutateEndpoints(callable $modifier)
in Extendable
at
line 27
static void
mutateFields(callable $modifier)
in Extendable
at
line 32
static void
mutateSorts(callable $modifier)
in Extendable
at
line 37
array
resolveEndpoints(bool $earlyResolution = false)
in Extendable
at
line 56
array
resolveFields()
in Extendable
at
line 75
array
resolveSorts()
in HasSortMap
at
line 16
array
sortMap()
in DispatchEventsTrait
at
line 19
void
dispatchEventsFor(mixed $entity, User|null $actor = null)
Dispatch all events for an entity.
at
line 543
object|null
saving(object $model, Context $context)
at
line 527
object|null
saved(object $model, Context $context)
at
line 536
void
deleting(object $model, Context $context)
in AbstractResource
at
line 30
string|null
id( Context $context)
in AbstractResource
at
line 35
string|null
routeNamePrefix()
at
line 71
string
model()
string|null
resource(object $model, Context $context)
string
getId(object $model, Context $context)
mixed
getValue(object $model, Field $field, Context $context)
protected mixed
getAttributeValue( Model $model, Field $field, Context $context)
protected mixed
getRelationshipValue( Model $model, Relationship $field, Context $context)
object
query( Context $context)
iterable
results(object $query, Context $context)
void
paginate(object $query, OffsetPagination $pagination)
int|null
count(object $query, Context $context)
at
line 81
object|null
find(string $id, Context $context)
protected bool
idCanBeKey( Model $model, string $id)
Whether the id can be a key of the model. An integer key only matches digits: databases treat anything else differently (MySQL reads "2abc" as 2, PostgreSQL rejects the query), so it is answered as not found.
void
setValue(object $model, Field $field, mixed $value, Context $context)
void
saveValue(object $model, Field $field, mixed $value, Context $context)
object
create(object $model, Context $context)
object
update(object $model, Context $context)
protected void
saveModel( Model $model, Context $context)
void
delete(object $model, Context $context)
protected string
property( Field $field)
Get the model property that a field represents.
protected string
method( Field $field)
Get the model method that a field represents.
at
line 100
object
newModel( Context $context)
final array
filters()
Filters that can be applied to the resource list.
array
mutateDataBeforeValidation( Context $context, array $data)
at
line 54
__construct( TranslatorInterface $translator, SlugManager $slugManager, SettingsRepositoryInterface $settings, ImageManager $imageManager, AvatarUploader $avatarUploader, AvatarValidator $imageValidator, Dispatcher $bus, LocaleManager $locales)
at
line 66
string
type()
at
line 120
array
endpoints()
at
line 220
array
fields()
at
line 512
array
sorts()
Sorts that can be applied to the resource list.
at
line 764
protected bool
canPinConnections()
at
line 776
protected string|null
resolveToAllowedIp(string $host)
Resolve a hostname (or accept a literal IP) and return the first address that is safe to connect to, or null if the host is unresolvable or only resolves to blocked (link-local / loopback / reserved) addresses.