protected function RdfParsingTrait::rdfElementIsBlankNode in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Traits/RdfParsingTrait.php \Drupal\Tests\rdf\Traits\RdfParsingTrait::rdfElementIsBlankNode()
- 9 core/modules/rdf/tests/src/Traits/RdfParsingTrait.php \Drupal\Tests\rdf\Traits\RdfParsingTrait::rdfElementIsBlankNode()
Checks if RDF Node property is blank.
Parameters
string $html: The HTML to parse.
string $base_uri: The base URI for the html being parsed.
string $resource_uri: The URI of the resource which should have the given property.
string $property: The property being tested.
Return value
bool TRUE if the given property is blank.
Throws
\EasyRdf\Exception
File
- core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php, line 143
Class
- RdfParsingTrait
- Defines a trait for parsing RDF properties from HTML.
Namespace
Drupal\Tests\rdf\TraitsCode
protected function rdfElementIsBlankNode($html, $base_uri, $resource_uri, $property) {
$parser = new Rdfa();
$graph = new Graph();
$parser
->parse($graph, $html, 'rdfa', $base_uri);
return $graph
->get($resource_uri, $property)
->isBnode();
}