public static function Helper::getPageJsonForEntity in Structured Data (JSON+LD Rich Snippets) 8
Get page JSON for entity.
Parameters
string $bundle: Bundle.
int $entity_id: Entity id.
Return value
mixed JSON for entity..
1 call to Helper::getPageJsonForEntity()
- Helper::getPageJson in src/
Core/ Helper.php - Get page JSON.
File
- src/
Core/ Helper.php, line 96
Class
- Helper
- Class Helper.
Namespace
Drupal\structured_data\CoreCode
public static function getPageJsonForEntity($bundle, $entity_id) {
$query = \Drupal::database()
->select('structured_data_json', 'sdj')
->fields('sdj')
->condition('bundle', $bundle)
->condition('entity_id', $entity_id);
$result = $query
->execute()
->fetchObject();
return $result;
}