ResourceTypeAttribute
class ResourceTypeAttribute extends ResourceTypeField (View source)
| internal | JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it. |
Specialization of a ResourceTypeField to represent a resource type attribute.
Properties
| protected string | $internalName | The internal field name. |
from ResourceTypeField |
| protected string | $publicName | The public field name. |
from ResourceTypeField |
| protected bool | $enabled | Whether the field is disabled. |
from ResourceTypeField |
| protected bool | $hasOne | Whether the field can only have one value. |
from ResourceTypeField |
Methods
__construct(string $internal_name, string $public_name = NULL, bool $enabled = TRUE, bool $has_one = TRUE)
ResourceTypeField constructor.
from
ResourceTypeField
withPublicName(string $public_name)
Establishes a new public name for the field.
from
ResourceTypeField
disabled()
Gets a new instance of the field that is disabled.
from
ResourceTypeField
Details
__construct(string $internal_name, string $public_name = NULL, bool $enabled = TRUE, bool $has_one = TRUE)
ResourceTypeField constructor.
string
getInternalName()
Gets the internal name of the field.
string
getPublicName()
Gets the public name of the field.
ResourceTypeField
withPublicName(string $public_name)
Establishes a new public name for the field.
ResourceTypeField
disabled()
Gets a new instance of the field that is disabled.
bool
isFieldEnabled()
Whether the field is enabled.
bool
hasOne()
Whether the field can only have one value.
bool
hasMany()
Whether the field can have many values.