_collection = $collectionFactory->create(); parent::__construct($context, $data); } public function getAthleteSlides() { $collection = $this->_collection; return $collection ->addStoreFilter($this->_storeManager->getStore()) ->addFieldToSelect('*') ->addFieldToFilter('status', 1) ->setOrder('sort_order', 'asc'); } public function getSlides() { $slides = [ ]; switch ($this->getConfig('athleteslideshow/general/slider')) { case 'revolution': break; case 'athlete': default: $slides = $this->getAthleteSlides(); } return $slides; } public function prepareStyle(array $style, string $separatorValue = ': ', string $separatorAttribute = ';') { $style = array_filter($style); if (empty($style)) { return ''; } foreach ($style as $key => &$value) { $value = $key . $separatorValue . $value; } $style = implode($separatorAttribute, $style); return $style; } public function isRevoulutionActive() { return $this->_loadObject(HelperHelper::class)->isRevoulutionActive(); } public function revolutionSliderAlias() { return $this->getConfig('athleteslideshow/revolutionslider/slider_id'); } }