helperData->getPostCollection(Data::TYPE_MONTHLY, $this->getMonthKey()); } /** * @return mixed */ protected function getMonthKey() { return $this->getRequest()->getParam('month_key'); } /** * @return false|string * @throws \Exception */ protected function getMonthLabel() { return $this->helperData->getDateFormat($this->getMonthKey() . '-10', true); } /** * @return void * @throws LocalizedException */ protected function _prepareLayout() { parent::_prepareLayout(); if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) { $breadcrumbs->addCrumb($this->getMonthKey(), [ 'label' => __('Monthy Archive'), 'title' => __('Monthy Archive') ]); } } /** * @param bool $meta * * @return array|false|string */ public function getBlogTitle($meta = false) { $blogTitle = parent::getBlogTitle($meta); if ($meta) { array_push($blogTitle, $this->getMonthLabel()); return $blogTitle; } return $this->getMonthLabel(); } }