protected function ContentBuilderForm::getDefaultFieldType in Schema.org configuration tool (RDF UI) 8
Gets default datatype for a given URI.
Parameters
string $uri: URI of Schema.org property.
Return value
string Default field type or text if there is no better match.
1 call to ContentBuilderForm::getDefaultFieldType()
- ContentBuilderForm::buildFormPageTwo in rdf_builder/
src/ Form/ ContentBuilderForm.php - Returns the form for the second page.
File
- rdf_builder/
src/ Form/ ContentBuilderForm.php, line 459
Class
Namespace
Drupal\rdf_builder\FormCode
protected function getDefaultFieldType($uri) {
$range_datatypes = $this->converter
->getRangeDataTypes($uri);
foreach ($range_datatypes as $datatype) {
if (array_key_exists($datatype, $this->datatype_field_mappings)) {
return $this->datatype_field_mappings[$datatype];
}
}
return 'string';
}