class CountableResourceType
Same name in other branches
- 9 core/modules/jsonapi/tests/modules/jsonapi_test_collection_count/src/ResourceType/CountableResourceType.php \Drupal\jsonapi_test_collection_count\ResourceType\CountableResourceType
- 8.9.x core/modules/jsonapi/tests/modules/jsonapi_test_collection_count/src/ResourceType/CountableResourceType.php \Drupal\jsonapi_test_collection_count\ResourceType\CountableResourceType
- 11.x core/modules/jsonapi/tests/modules/jsonapi_test_collection_count/src/ResourceType/CountableResourceType.php \Drupal\jsonapi_test_collection_count\ResourceType\CountableResourceType
Subclass with overridden ::includeCount() for testing purposes.
Hierarchy
- class \Drupal\jsonapi\ResourceType\ResourceType
- class \Drupal\jsonapi_test_collection_count\ResourceType\CountableResourceType extends \Drupal\jsonapi\ResourceType\ResourceType
Expanded class hierarchy of CountableResourceType
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_collection_count/ src/ ResourceType/ CountableResourceType.php, line 10
Namespace
Drupal\jsonapi_test_collection_count\ResourceTypeView source
class CountableResourceType extends ResourceType {
/**
* {@inheritdoc}
*/
public function includeCount() {
return TRUE;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
CountableResourceType::includeCount | public | function | Determine whether to include a collection count. | Overrides ResourceType::includeCount |
ResourceType::$bundle | protected | property | The bundle ID. | |
ResourceType::$deserializationTargetClass | protected | property | The class to which a payload converts to. | |
ResourceType::$entityTypeId | protected | property | The entity type ID. | |
ResourceType::$fieldMapping | protected | property | The mapping for field aliases: keys=public names, values=internal names. | |
ResourceType::$fields | protected | property | The list of fields on the underlying entity type + bundle. | |
ResourceType::$internal | protected | property | Whether this resource type is internal. | |
ResourceType::$isLocatable | protected | property | Whether this resource type's resources are locatable. | |
ResourceType::$isMutable | protected | property | Whether this resource type's resources are mutable. | |
ResourceType::$isVersionable | protected | property | Whether this resource type's resources are versionable. | |
ResourceType::$relatableResourceTypesByField | protected | property | An array of arrays of relatable resource types, keyed by public field name. | |
ResourceType::$typeName | protected | property | The type name. | |
ResourceType::getBundle | public | function | Gets the bundle. | |
ResourceType::getDeserializationTargetClass | public | function | Gets the deserialization target class. | |
ResourceType::getEntityTypeId | public | function | Gets the entity type ID. | |
ResourceType::getFieldByInternalName | public | function | Gets a particular attribute or relationship field by internal field name. | |
ResourceType::getFieldByPublicName | public | function | Gets a particular attribute or relationship field by public field name. | |
ResourceType::getFields | public | function | Gets the attribute and relationship fields of this resource type. | |
ResourceType::getInternalName | public | function | Translates the public field name to the entity field name. | |
ResourceType::getPath | public | function | Get the resource path. | |
ResourceType::getPublicName | public | function | Translates the entity field name to the public field name. | |
ResourceType::getRelatableResourceTypes | public | function | Get all resource types with which this type may have a relationship. | |
ResourceType::getRelatableResourceTypesByField | public | function | Get all resource types with which the given field may have a relationship. | |
ResourceType::getTypeName | public | function | Gets the type name. | |
ResourceType::hasField | public | function | Checks if the field exists. | |
ResourceType::isFieldEnabled | public | function | Checks if a field is enabled or not. | |
ResourceType::isInternal | public | function | Whether this resource type is internal. | |
ResourceType::isLocatable | public | function | Whether resources of this resource type are locatable. | |
ResourceType::isMutable | public | function | Whether resources of this resource type are mutable. | |
ResourceType::isVersionable | public | function | Whether resources of this resource type are versionable. | |
ResourceType::setRelatableResourceTypes | public | function | Sets the relatable resource types. | |
ResourceType::TYPE_NAME_URI_PATH_SEPARATOR | constant | A string which is used as path separator in resource type names. | ||
ResourceType::__construct | public | function | Instantiates a ResourceType object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.