| 1 | <?php | ||
| 21 | class StructuredDataExtension extends AbstractExtension | ||
| 22 | { | ||
| 23 | /** | ||
| 24 | * @var StructuredDataAwarePage | ||
| 25 | */ | ||
| 26 | protected $page; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $encoding; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @param StructuredDataAwarePage $page | ||
| 35 | */ | ||
| 36 | public function __construct(StructuredDataAwarePage $page) | ||
| 40 | |||
| 41 | /** | ||
| 42 |      * {@inheritdoc} | ||
| 43 | */ | ||
| 44 | public function getFunctions() | ||
| 50 | |||
| 51 | /** | ||
| 52 | * Creates a script tag with type 'json-ld' and the JSON-LD string stored in page object. | ||
| 53 | * | ||
| 54 | * @return string | ||
| 55 | */ | ||
| 56 | public function getStructuredData() | ||
| 64 | } | ||
| 65 |