private function HtmlAssetInliner::getTags in TMGMT Translator Smartling 8
Returns tags list for specified selector
Parameters
$selector - xpath selector expression:
Return value
DOMNodeList
3 calls to HtmlAssetInliner::getTags()
- HtmlAssetInliner::convertImageToDataUri in src/
Context/ HtmlAssetInliner.php - Converts images to data URIs
- HtmlAssetInliner::removeUseless in src/
Context/ HtmlAssetInliner.php - Removes <link>, <meta> and <script> tags from generated page
- HtmlAssetInliner::toAbsoluteURLs in src/
Context/ HtmlAssetInliner.php - Converts relative <a> tag paths to absolute paths
File
- src/
Context/ HtmlAssetInliner.php, line 151
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
private function getTags($selector) {
$this->dom
->loadHTML($this->html);
$xpath = new DOMXpath($this->dom);
$tags = $xpath
->query($selector);
# free memory
libxml_use_internal_errors(FALSE);
libxml_use_internal_errors(TRUE);
libxml_clear_errors();
unset($xpath);
$xpath = NULL;
return $tags;
}