$this->limit = $limit;
}
+ /**
+ * "Setter" for limit from a configuration entry
+ *
+ * @param $configEntry The configuration entry which hold a number as limit
+ * @return void
+ */
+ public final function setConfiguredLimit ($configEntry) {
+ // Get the limit from config entry and set it
+ $limit = $this->getConfigInstance()->getConfigEntry($configEntry);
+ $this->setLimit($limit);
+ }
+
/**
* Getter for limit
*
$criteriaInstance->addCriteria('page', $command);
// Add limitation from config
- $criteriaInstance->setLimit($this->getConfigInstance()->getConfigEntry('news_' . $command . '_limit'));
+ $criteriaInstance->setConfiguredLimit('news_' . $command . '_limit');
// Get a resultInstance back from the database
$resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
$criteriaInstance->addCriteria('page', $page);
// Add limitation from config
- $criteriaInstance->setLimit($this->getConfigInstance()->getConfigEntry('news_' . $page . '_limit'));
+ $criteriaInstance->setConfiguredLimit('news_' . $page . '_limit');
// Get a resultInstance back from the database
$resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);