protected function RdfParsingTrait::rdfElementIsBlankNode in Drupal 9
Same name and namespace in other branches
- 8 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
1 call to RdfParsingTrait::rdfElementIsBlankNode()
- CommentAttributesTest::_testBasicCommentRdfaMarkup in core/
modules/ rdf/ tests/ src/ Functional/ CommentAttributesTest.php - Helper function for testCommentRdfaMarkup().
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 = $this
->getInstanceParser();
$graph = $this
->getInstanceGraph();
$parser
->parse($graph, $html, 'rdfa', $base_uri);
return $graph
->get($resource_uri, $property)
->isBnode();
}