Pimcore\Model\Document\Tag\Pdf::getCacheTags PHP Метод

getCacheTags() публичный Метод

public getCacheTags ( $ownerDocument, $tags = [] )
    public function getCacheTags($ownerDocument, $tags = [])
    {
        $tags = is_array($tags) ? $tags : [];
        $asset = Asset::getById($this->id);
        if ($asset instanceof Asset) {
            if (!array_key_exists($asset->getCacheTag(), $tags)) {
                $tags = $asset->getCacheTags($tags);
            }
            $getMetaDataCacheTags = function ($data, $tags) {
                if (!is_array($data)) {
                    return $tags;
                }
                foreach ($data as $page) {
                    foreach ($page as $element) {
                        if (array_key_exists("data", $element) && is_array($element["data"]) && count($element["data"]) > 0) {
                            foreach ($element["data"] as $metaData) {
                                if ($metaData["value"] instanceof Element\ElementInterface) {
                                    $tags = $metaData["value"]->getCacheTags($tags);
                                }
                            }
                        }
                    }
                }
                return $tags;
            };
            $tags = $getMetaDataCacheTags($this->hotspots, $tags);
        }
        return $tags;
    }