Loading src/WotApiResource/ResourceObject.php −6 Changes for src/WotApiResource/ResourceObject.php: 0 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -261,13 +261,7 @@ class ResourceObject implements CacheableDependencyInterface, ResourceIdentifier array_keys($fields), [$resource_type, 'isFieldEnabled'] ); // The "label" field needs special treatment: some entity types have a label // field that is actually backed by a label callback. $entity_type = $entity->getEntityType(); if ($entity_type->hasLabelCallback()) { $fields[static::getLabelFieldName($entity)]->value = $entity->label(); } // Return a sub-array of $output containing the keys in $enabled_fields. $input = array_intersect_key($fields, array_flip($enabled_field_names)); Loading Loading
src/WotApiResource/ResourceObject.php −6 Changes for src/WotApiResource/ResourceObject.php: 0 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -261,13 +261,7 @@ class ResourceObject implements CacheableDependencyInterface, ResourceIdentifier array_keys($fields), [$resource_type, 'isFieldEnabled'] ); // The "label" field needs special treatment: some entity types have a label // field that is actually backed by a label callback. $entity_type = $entity->getEntityType(); if ($entity_type->hasLabelCallback()) { $fields[static::getLabelFieldName($entity)]->value = $entity->label(); } // Return a sub-array of $output containing the keys in $enabled_fields. $input = array_intersect_key($fields, array_flip($enabled_field_names)); Loading