postCollectionFactory = $postCollectionFactory; $this->commentCollectionFactory = $commentCollectionFactory; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } /** * @inheritdoc */ protected function _construct() { $this->_init(ResourceModel\Comment::class); } /** * @inheritdoc */ public function getIdentities() { return [self::CACHE_TAG . '_' . $this->getId()]; } }