Exemple #1
0
 /**
  * Resolves dependencies and create tags for caching out of them
  *
  * @return array
  */
 public function getCacheTags($tags = array())
 {
     $tags = is_array($tags) ? $tags : array();
     $tags = parent::getCacheTags($tags);
     if ($this->getSourceDocument()) {
         if ($this->getSourceDocument()->getId() != $this->getId() and !array_key_exists($this->getSourceDocument()->getCacheTag(), $tags)) {
             $tags = $this->getSourceDocument()->getCacheTags($tags);
         }
     }
     return $tags;
 }
Exemple #2
0
 /**
  * Resolves dependencies and create tags for caching out of them
  *
  * @return array
  */
 public function getCacheTags($tags = array())
 {
     $tags = is_array($tags) ? $tags : array();
     $tags = parent::getCacheTags($tags);
     if ($this->getLinktype() == "internal") {
         if ($this->getObject() instanceof Document || $this->getObject() instanceof Asset) {
             if ($this->getObject()->getId() != $this->getId() and !array_key_exists($this->getObject()->getCacheTag(), $tags)) {
                 $tags = $this->getObject()->getCacheTags($tags);
             }
         }
     }
     return $tags;
 }
 /**
  * Resolves dependencies and create tags for caching out of them
  *
  * @return array
  */
 public function getCacheTags($tags = array())
 {
     $tags = is_array($tags) ? $tags : array();
     $tags = parent::getCacheTags($tags);
     foreach ($this->getElements() as $element) {
         $tags = $element->getCacheTags($this, $tags);
     }
     return $tags;
 }