Issue #3521239 Add hook for page visibility of the schema
1 open thread
Closes #3521239
Merge request reports
Activity
- schemaapp.api.php 0 → 100644
12 13 /** 14 * Determine if the schema should be added to the page. 15 * 16 * @param array $page 17 * The page array as provided in hook_page_attachments_alter(). 18 * 19 * @return int|null 20 * Return -1 to NOT add the schema to the page. 21 * Return NULL will add the schema to the page. 22 */ 23 function hook_schemaapp_schema_visibility(array $page): ?int { 24 if (!empty($page['my_special_region']) || 25 \Drupal::routeMatch()->getRouteName() == 'my_custom_route') { 26 return -1; 27 } - Comment on lines +24 to +27
Please register or sign in to reply