I have applied a filter in a PHTML that loads in headers. The filter is below.
In Constructor:
MagentoCatalogModelResourceModelCategoryCollection $collection
Block Code:
public function getAllCategories(){
return $this->collection;
}
In PHTML:
$getAllCategories = $block->getAllCategories();
$getAllCategories->addAttributeToSelect('*')->addAttributeToFilter('entity_id',array('in' => array($attributVaueArray)))->setOrder('updated_at', 'desc');
But I need to get the same collection in different PHTML without filters. If I use this Model in instructor the filter is applied automatically but I need to reset it.
Thanks in advance.