public function ResourceType::isFieldEnabled in JSON:API 8
Same name and namespace in other branches
- 8.2 src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::isFieldEnabled()
Checks if a field is enabled or not.
This is only here so we can allow polymorphic implementations to take a greater control on the data model.
Parameters
string $field_name: The internal field name.
Return value
bool TRUE if the field is enabled and should be considered as part of the data model. FALSE otherwise.
File
- src/
ResourceType/ ResourceType.php, line 145
Class
- ResourceType
- Value object containing all metadata for a JSON API resource type.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function isFieldEnabled($field_name) {
// By default all fields are enabled.
return TRUE;
}