function ResourceTypeField::__construct
Same name in other branches
- 8.9.x core/modules/jsonapi/src/ResourceType/ResourceTypeField.php \Drupal\jsonapi\ResourceType\ResourceTypeField::__construct()
- 10 core/modules/jsonapi/src/ResourceType/ResourceTypeField.php \Drupal\jsonapi\ResourceType\ResourceTypeField::__construct()
- 11.x core/modules/jsonapi/src/ResourceType/ResourceTypeField.php \Drupal\jsonapi\ResourceType\ResourceTypeField::__construct()
ResourceTypeField constructor.
Parameters
string $internal_name: The internal field name.
string $public_name: (optional) The public field name. Defaults to the internal field name.
bool $enabled: (optional) Whether the field is enabled. Defaults to TRUE.
bool $has_one: (optional) Whether the field can only have ony value. Defaults to TRUE.
File
-
core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeField.php, line 58
Class
- ResourceTypeField
- Abstract value object containing all metadata for a JSON:API resource field.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function __construct($internal_name, $public_name = NULL, $enabled = TRUE, $has_one = TRUE) {
$this->internalName = $internal_name;
$this->publicName = $public_name ?: $internal_name;
$this->enabled = $enabled;
$this->hasOne = $has_one;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.