You are here

class CountableResourceType in JSON:API 8

Same name and namespace in other branches
  1. 8.2 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

Expanded class hierarchy of CountableResourceType

File

tests/modules/jsonapi_test_collection_count/src/ResourceType/CountableResourceType.php, line 10

Namespace

Drupal\jsonapi_test_collection_count\ResourceType
View source
class CountableResourceType extends ResourceType {

  /**
   * {@inheritdoc}
   */
  public function includeCount() {
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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::$internal protected property Whether this resource type is internal.
ResourceType::$isLocatable protected property Whether this resource type's resources are locatable.
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::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::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::setRelatableResourceTypes public function Sets the relatable resource types.
ResourceType::__construct public function Instantiates a ResourceType object.