コード例 #1
0
 protected function clearParents(TaxonomyTermInterface $term)
 {
     if ($term->hasParent()) {
         $parent = $term->getParent();
         $this->cacheService->clearByTags(['route_taxonomy/term/get', 'param_term_' . $parent->getId()]);
         $this->clearParents($parent);
     }
 }
コード例 #2
0
 protected function clearTaxonomyTerms(Collection $collection)
 {
     foreach ($collection as $term) {
         if ($term instanceof TaxonomyTermInterface) {
             $this->cacheService->clearByTags(['route_taxonomy/term/get', 'param_term_' . $term->getId()]);
         }
     }
 }
コード例 #3
0
 public function testClearByTagsIsSkippedForNonTaggableStorageAdapters()
 {
     $this->cacheService->clearByTags(array('foo'));
 }