예제 #1
0
파일: Event.php 프로젝트: kurtkk/seminars
 /**
  * Limits the bag to date event records of the same topic as the event
  * given in the first parameter $event.
  *
  * @param tx_seminars_seminar $event the date or topic object to find other dates of the same topic for
  *
  * @return void
  */
 public function limitToOtherDatesForTopic(tx_seminars_seminar $event)
 {
     if (!$event->isEventDate() && !$event->isEventTopic()) {
         throw new InvalidArgumentException('The first parameter $event must be either a date or a topic record.', 1333292764);
     }
     $this->whereClauseParts['other_dates'] = '(' . 'tx_seminars_seminars.topic = ' . $event->getTopicUid() . ' AND object_type = ' . tx_seminars_Model_Event::TYPE_DATE . ' AND uid <> ' . $event->getUid() . ')';
 }