You are here

class CountableResourceType in Drupal 9

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

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\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::$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.