Skip to content

Commit

Permalink
Adding missing parts for cache flushing after menu changes are saved
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus committed Jul 30, 2020
1 parent fae040b commit 71f685c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Model/ResourceModel/Menu/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,20 @@ protected function _toOptionArray($valueField = 'menu_id', $labelField = 'title'

return $res;
}

/**
* @return $this
*/
protected function _afterLoadData()
{
parent::_afterLoadData();

$collection = clone $this;

if (count($collection)) {
$this->_eventManager->dispatch('scandipwa_menuorganizer_menu_collection_load_after', ['collection' => $collection]);
}

return $this;
}
}

0 comments on commit 71f685c

Please sign in to comment.