public function TypeMapperBase::getMappedValue in Schemata 8
Convert the data definition property to a JSON Schema form.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $property: The data definition property.
Return value
mixed The mapped value to represent the property in a JSON Schema schema.
Overrides TypeMapperInterface::getMappedValue
6 calls to TypeMapperBase::getMappedValue()
- DateTime8601TypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ DateTime8601TypeMapper.php - Convert the data definition property to a JSON Schema form.
- EmailTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ EmailTypeMapper.php - Convert the data definition property to a JSON Schema form.
- EntityReferenceTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ EntityReferenceTypeMapper.php - Convert the data definition property to a JSON Schema form.
- FallbackTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ FallbackTypeMapper.php - Convert the data definition property to a JSON Schema form.
- FilterFormatTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ FilterFormatTypeMapper.php - Convert the data definition property to a JSON Schema form.
6 methods override TypeMapperBase::getMappedValue()
- DateTime8601TypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ DateTime8601TypeMapper.php - Convert the data definition property to a JSON Schema form.
- EmailTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ EmailTypeMapper.php - Convert the data definition property to a JSON Schema form.
- EntityReferenceTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ EntityReferenceTypeMapper.php - Convert the data definition property to a JSON Schema form.
- FallbackTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ FallbackTypeMapper.php - Convert the data definition property to a JSON Schema form.
- FilterFormatTypeMapper::getMappedValue in schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ FilterFormatTypeMapper.php - Convert the data definition property to a JSON Schema form.
File
- schemata_json_schema/
src/ Plugin/ schemata_json_schema/ type_mapper/ TypeMapperBase.php, line 38
Class
- TypeMapperBase
- Base class for TypeMappers plugins.
Namespace
Drupal\schemata_json_schema\Plugin\schemata_json_schema\type_mapperCode
public function getMappedValue(DataDefinitionInterface $property) {
$value = [
'type' => $this
->getPluginId(),
];
if ($item = $property
->getLabel()) {
$value['title'] = $item;
}
if ($item = $property
->getDescription()) {
$value['description'] = addslashes(strip_tags($item));
}
return $value;
}