Example #1
0
 /**
  * @return \Sample\News\Model\Resource\Author\Collection
  */
 public function getAuthorCollection()
 {
     if (is_null($this->authorCollection)) {
         $this->authorCollection = $this->categoryModel->getSelectedAuthorsCollection($this->getCategory())->addStoreFilter($this->_storeManager->getStore()->getId())->addFieldToFilter('is_active', 1);
         //TODO: use constant here
         $this->authorCollection->getSelect()->order('related_category.position');
     }
     return $this->authorCollection;
 }