public function SubTreeHelper::getPageAttachments in Term Reference Fancytree 8.2
Helper that implements hook_page_attachments().
Parameters
string $route: Route ID.
array $page: Drupal's page attributes.
Return value
array Updated Drupal's page attributes.
File
- src/
Helper/ SubTreeHelper.php, line 52
Class
- SubTreeHelper
- SubTree helper service.
Namespace
Drupal\term_reference_fancytree\HelperCode
public function getPageAttachments(string $route, array $page) : array {
$page['#attached']['drupalSettings']['lazyLoadUrl'] = $this
->getUrlPathByRoute($route);
return $page;
}