protected function FormatterHalJson::withCurie in RESTful 7.2
Prefix a property name with the curie, if present.
Parameters
string $property_name: The input string.
Return value
string The property name prefixed with the curie.
2 calls to FormatterHalJson::withCurie()
- FormatterHalJson::addHateoas in src/
Plugin/ formatter/ FormatterHalJson.php - Add HATEOAS links to list of item.
- FormatterHalJson::prepare in src/
Plugin/ formatter/ FormatterHalJson.php - Massages the raw data to create a structured array to pass to the renderer.
File
- src/
Plugin/ formatter/ FormatterHalJson.php, line 253 - Contains \Drupal\restful\Plugin\formatter\FormatterHalJson.
Class
- FormatterHalJson
- Class FormatterHalJson @package Drupal\restful\Plugin\formatter
Namespace
Drupal\restful\Plugin\formatterCode
protected function withCurie($property_name) {
if ($curie = $this
->getCurie()) {
return $property_name ? $curie['name'] . static::CURIE_SEPARATOR . $property_name : $curie['name'];
}
return $property_name;
}