Пример #1
0
 /**
  * Sets a query limit to the given query for the given demand
  *
  * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query
  * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\EventDemand $eventDemand EventDemand
  *
  * @return void
  */
 protected function setQueryLimitFromDemand($query, EventDemand $eventDemand)
 {
     if ($eventDemand->getQueryLimit() != NULL && MathUtility::canBeInterpretedAsInteger($eventDemand->getQueryLimit()) && (int) $eventDemand->getQueryLimit() > 0) {
         $query->setLimit((int) $eventDemand->getQueryLimit());
     }
 }
Пример #2
0
 /**
  * @test
  * @return void
  */
 public function getQueryLimitReturnsExpectedQueryLimit()
 {
     $this->subject->setQueryLimit(10);
     $this->assertSame(10, $this->subject->getQueryLimit());
 }