You are here

public function AMPService::getComponentTags in Accelerated Mobile Pages (AMP) 8.3

Given an array of discovered JS requirements, identify the amp tags.

Parameters

array $components: An array of javascript urls that the AMP library discovered.

Return value

array An array of the AMP tags used in this text.

File

src/Service/AMPService.php, line 138

Class

AMPService
Class AMPService.

Namespace

Drupal\amp\Service

Code

public function getComponentTags(array $components) {
  $tags = [];
  $map = $this
    ->mapJSToNames();
  foreach ($components as $tag => $component_url) {
    $tags[] = $tag;
  }
  return $tags;
}