public function getCriteriaForListModule(array $archives, $featured, Module $module)
    {
        $criteria = new NewsCriteria($this->framework);

        try {
            $criteria->setBasicCriteria($archives, $module->news_order);

            // Set the featured filter
            if (null !== $featured) {
                $criteria->setFeatured($featured);
            }

            // Set the criteria for related categories
            if ($module->news_relatedCategories) {
                $this->setRelatedListCriteria($criteria, $module);
            } else {
                // Set the regular list criteria
                $this->setRegularListCriteria($criteria, $module);
            }
        } catch (NoNewsException $e) {
            return null;
        }

        return $criteria;
    }
public function getCriteriaForListModule(array $archives, $featured, Module $module)
    {
        $criteria = new NewsCriteria($this->framework);

        try {
            $criteria->setBasicCriteria($archives, $module->news_order);

            // Set the featured filter
            if (null !== $featured) {
                $criteria->setFeatured($featured);
            }

            // Set the criteria for related categories
            if ($module->news_relatedCategories) {
                $this->setRelatedListCriteria($criteria, $module);
            } else {
                // Set the regular list criteria
                $this->setRegularListCriteria($criteria, $module);
            }
        } catch (NoNewsException $e) {
            return null;
        }

        return $criteria;
    }
public function getCriteriaForListModule ( array $ archives , $ featured , Module $ module ) { $ criteria = new NewsCriteria ( $ this -> framework ) ; try { $ criteria -> setBasicCriteria ( $ archives , $ module -> news_order ) ; // Set the featured filter if ( null !== $ featured ) { $ criteria -> setFeatured ( $ featured ) ; } // Set the criteria for related categories if ( $ module -> news_relatedCategories ) { $ this -> setRelatedListCriteria ( $ criteria , $ module ) ; } else { // Set the regular list criteria $ this -> setRegularListCriteria ( $ criteria , $ module ) ; } } catch ( NoNewsException $ e ) { return null ; } return $ criteria ; }
Get the criteria for list module.

@param array     $archives
@param bool|null $featured
@param Module    $module

@return NewsCriteria|null
Get the criteria for list module .