当前位置: 首页>>代码示例>>PHP>>正文


PHP Event::getId方法代码示例

本文整理汇总了PHP中Event::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::getId方法的具体用法?PHP Event::getId怎么用?PHP Event::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Event的用法示例。


在下文中一共展示了Event::getId方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dispatch

 /**
  *
  *
  * @param Event $event
  * @return void
  */
 public function dispatch(Event $event)
 {
     $eventId = $event->getId();
     if (array_key_exists($eventId, $this->listeners)) {
         foreach ($this->listeners[$eventId] as $listener) {
             $listener->handle($event);
         }
     }
 }
开发者ID:jmfeurprier,项目名称:perf-event-dispatch,代码行数:15,代码来源:EventDispatcher.php

示例2: run

 public function run(Event $event)
 {
     foreach ((array) $this->_listeners[$event->getId()] as $listener) {
         call_user_func($listener->getCallback(), $event);
         if ($event->isPropagationStopped()) {
             break;
         }
     }
     return $event;
 }
开发者ID:finef,项目名称:event,代码行数:10,代码来源:Dispatcher.php

示例3: createDayViewEvent

 /**
  * Creates events for the day view.
  *
  * @param Event $event
  * @param int $lwst
  * @param int $hgst
  * @param int $cl_start
  * @param int $cl_end
  * @param array $events_created
  * @return boolean
  */
 private static function createDayViewEvent($event, $lwst, $hgst, $cl_start, $cl_end, array &$events_created)
 {
     // if this date is in the exceptions?
     if ($event->getProperty('EXDATE')) {
         $exdates = explode(',', $event->getProperty('EXDATE'));
         foreach ($exdates as $exdate) {
             if ($exdate > 0 && $exdate >= $lwst && $exdate <= $hgst) {
                 return false;
             }
         }
     }
     // is event expired?
     $rrule = $event->getRecurrence();
     if ($rrule['rtype'] != 'SINGLE' && $rrule['expire'] > 0 && $rrule['expire'] < $hgst) {
         return false;
     }
     $start = mktime(date('G', $event->getStart()), date('i', $event->getStart()), date('s', $event->getStart()), date('n', $lwst), date('j', $lwst), date('Y', $lwst));
     $end = mktime(date('G', $event->getEnd()), date('i', $event->getEnd()), date('s', $event->getEnd()), date('n', $hgst), date('j', $hgst), date('Y', $hgst));
     if ($start <= $cl_start && $end >= $cl_end || $start >= $cl_start && $start < $cl_end || $end > $cl_start && $end <= $cl_end) {
         if (!$events_created[implode('', (array) $event->getId()) . $start]) {
             $new_event = clone $event;
             $new_event->setStart($start);
             $new_event->setEnd($end);
             $events_created[implode('', (array) $event->getId()) . $start] = $new_event;
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:38,代码来源:SingleCalendar.php

示例4: date

            if (date('Y-m-d', strtotime($event->getRemindMeTime())) == date('Y-m-d', strtotime($event->getStartDateTime()))) {
                echo date('H:i', strtotime($event->getRemindMeTime()));
            } else {
                echo $event->getRemindMeTime();
            }
            echo '&nbsp;';
        }
        echo '<i class="fa fa-clock-o"></i> ';
        if ($event->getAllDay() == '1') {
            echo "all day";
        } else {
            echo $start_time . '-' . $end_time;
        }
        echo '</small>';
        echo '&nbsp;<i class="fa fa-info-circle"></i> ';
        echo $event->getDescription() . ' <small><a href="/edit_evt.php?id=' . $event->getId() . '">edit</a>';
        if ($event->getUserId() == Authentication::get_user() || PermissionMgr::groupHasPermission(Authentication::getUserObject()->getGroupId(), 'is_administrator')) {
            echo '&nbsp;<a href="#" onclick="deleteEvt(' . $event->getId() . ', \'' . htmlspecialchars($event->getDescription()) . '\')">delete</a>';
        }
        echo '</small></h5>';
        $number += 1;
    }
    if ($number == 0) {
        echo '<i>No events on this date.</i>';
    }
    $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
    echo '<hr>';
}
?>
     
	
开发者ID:ryunoneil,项目名称:a2-comp4,代码行数:29,代码来源:calendar.php

示例5: json_encode_event

function json_encode_event(Event $event)
{
    return [$event->getId(), $event->getStartdate(), $event->getEnddate(), $event->getUsers(), $event->getLocation(), $event->getDescription(), $event->getName(), $event->getHosts(), $event->getTags()];
}
开发者ID:avelrd,项目名称:bam,代码行数:4,代码来源:app.php

示例6: Event

             // name of all event volunteers from the DB
             echo '<option>', $head['username'], '</option>';
         }
         // we set a hidden input eventvol to eventvol, so that we know we want to assign an event to volunteer
         echo '</select><br><input type="hidden" name="eventvol" value="eventvol"/><input type="submit" value="Assign" /></form>';
     }
     break;
 case 'eventcat':
     // case -> assign event to catagory
     if (isset($_POST['eventcat'])) {
         if (isset($_POST['eventname']) and isset($_POST['catname'])) {
             $e = new Event();
             $c = new Catagory();
             if ($e->select($_POST['eventname'])) {
                 if ($c->select($_POST['catname'])) {
                     echo $c->addEvent($e->getId());
                     // assigning the event to catagory
                 } else {
                     echo 'Catagory Does Not Exist';
                 }
             } else {
                 echo 'Event Does Not Exist';
             }
         } else {
             echo 'Please check your entries';
         }
     } else {
         // displaying the list of all events and heads
         $e = new Event();
         $c = new Catagory();
         echo '<form method="POST">Select an Event and Head<br><select name="eventname">';
开发者ID:ankurs,项目名称:Project-11,代码行数:31,代码来源:admin.php

示例7: processForm

 protected function processForm(sfWebRequest $request, sfForm $form)
 {
     //var_dump($request->getParameter('event[start_time]'));
     $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
     if ($form->isValid()) {
         //$event = $form->save();
         $name = $form->getValue('name');
         $venue = $form->getValue('venue');
         $description = $form->getValue('description');
         $price = $form->getValue('price');
         $c_ids = $form->getValue('category_ids');
         $event_url = $form->getValue('event_url');
         $start_time = $form->getValue('start_time');
         $end_time = $form->getValue('end_time');
         $date = $form->getValue('date');
         $o_id = $form->getValue('organizer_id');
         $event = null;
         if (!$form->getObject()->isNew()) {
             $event = $form->getObject();
             //Delete previous relations to genres
             Doctrine_Core::getTable('EventCategory')->createQuery()->delete()->where('event_id = ?', $event->getId())->execute();
         } else {
             $event = new Event();
         }
         if ($event === null) {
             $event = new Event();
         }
         //$event = new Event();
         //$event->setCategoryId($c_id);
         $event->setName($name);
         $event->setDescription($description);
         $event->setPrice($price);
         $event->setVenue($venue);
         $event->setEventUrl($event_url);
         $event->setStartTime($start_time);
         $event->setEndTime($end_time);
         $event->setOrganizerId($o_id);
         $sql_date = date("Y-m-d", strtotime($date));
         $event->setDate($sql_date);
         $event->save();
         foreach ($c_ids as $cid) {
             $ec = new EventCategory();
             $ec->setEventId($event->getId());
             $ec->setCategoryId($cid);
             $ec->save();
         }
         $this->getUser()->setAttribute('m', 1);
         $this->redirect('organize/edit?id=' . $event->getId() . '&m=1');
     }
 }
开发者ID:huqa,项目名称:trevents,代码行数:50,代码来源:actions.class.php

示例8: countGuests

 /**
  * Counts the number of guests for event
  * @param Event $event
  *
  * @return int
  */
 public function countGuests($event)
 {
     $numberOfGuests = $this->getEntityManager()->createQueryBuilder('e')->select('count(e.id)')->from('CoreBundle:Event', 'e')->join('e.guests', 'g')->where('e.id = :event')->setParameter('event', $event->getId())->getQuery()->getSingleScalarResult();
     return $numberOfGuests;
 }
开发者ID:CedricCarrard,项目名称:eventApp,代码行数:11,代码来源:EventRepository.php

示例9: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Event $value A Event object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Event $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
开发者ID:yasirgit,项目名称:afids,代码行数:22,代码来源:BaseEventPeer.php

示例10: Event

if ($period == "all") {
    echo 'Vergangene und kommende Veranstaltungen';
}
?>
		</h2>
		<hr>
		<ul class="events layout list">
			<?php 
for ($i = ($pagenum - 1) * PERPAGE; $i < $events->getTotalEvents() && $i < $pagenum * PERPAGE; $i++) {
    $event = new Event($events->getEvent($i));
    ?>
				<li class="box">

					<div class="leftdiv left">
						<a href="<?php 
    echo BASEPATH . DS . $page . DS . $event->getId();
    ?>
">
							<img src="<?php 
    echo $event->getThumb();
    ?>
" alt="<?php 
    echo $event->getTitle();
    ?>
">
						</a>
					</div>
					
					<div class="vr left"></div>
					
					<div class="rightdiv left">
开发者ID:reggiD213,项目名称:www.hexenhaus-metal.de,代码行数:31,代码来源:events-list.php

示例11: Event

echo BASEPATH . DS . $page . DS . $tab . DS;
?>
new">
		<li class="box">
			<h3 class="glow"><i class="fa fa-plus-circle"></i> Neue Veranstaltung erstellen</h3>
		</li>
	</a>

<?php 
for ($i = $events->getTotalEvents() - 1; $i >= 0; $i--) {
    //create an event instance for every iteration
    $event = new Event($events->getEvent($i));
    ?>
	<a href="<?php 
    echo BASEPATH . DS . $page . DS . $tab . DS;
    echo $event->getId();
    ?>
">
		<li class="box">
			<h3 class="glow"><?php 
    echo $event->getDate('readable');
    ?>
</h3>
			<p class="dull">Eintritt: <?php 
    echo $event->getPrice();
    ?>
 | Einlass: <?php 
    echo $event->getTime();
    ?>
 | Gäste: <?php 
    echo $event->getGuests();
开发者ID:reggiD213,项目名称:www.hexenhaus-metal.de,代码行数:31,代码来源:adm-events-list.php

示例12: setEvent

 /**
  * Declares an association between this object and a Event object.
  *
  * @param      Event $v
  * @return     EventReservation The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setEvent(Event $v = null)
 {
     if ($v === null) {
         $this->setEventId(NULL);
     } else {
         $this->setEventId($v->getId());
     }
     $this->aEvent = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Event object, it will not be re-added.
     if ($v !== null) {
         $v->addEventReservation($this);
     }
     return $this;
 }
开发者ID:yasirgit,项目名称:afids,代码行数:22,代码来源:BaseEventReservation.php

示例13: testGetId

 /**
  *
  */
 public function testGetId()
 {
     $id = 'foo.bar';
     $event = new Event($id);
     $this->assertSame($id, $event->getId());
 }
开发者ID:jmfeurprier,项目名称:perf-event-dispatch,代码行数:9,代码来源:EventTest.php

示例14: executeCreate

 public function executeCreate()
 {
     if ($this->getRequest()->getMethod() != sfRequest::POST) {
         $this->event = new Event();
         $this->etime = new Etime();
         $this->forward404Unless($this->event);
         $this->forward404Unless($this->etime);
     } else {
         $event = new Event();
         $etime = new Etime();
         $event->setTitle($this->getRequestParameter('title'));
         $event->setStatusId($this->getRequestParameter('status_id') ? $this->getRequestParameter('status_id') : null);
         $event->setCategoryId($this->getRequestParameter('category_id') ? $this->getRequestParameter('category_id') : null);
         $event->setPublished($this->getRequestParameter('published', 0));
         $event->setMediaPotential($this->getRequestParameter('media_potential', 0));
         $event->setDescription($this->getRequestParameter('description'));
         $event->setNotes($this->getRequestParameter('notes'));
         $event->setImageUrl($this->getRequestParameter('image_url'));
         //      $event->setOrganiser($this->getRequestParameter('organiser'));
         //      $event->setInterestedParties($this->getRequestParameter('interested_parties'));
         $event->save();
         $etime->setEventId($event->getId());
         $etime->setTitle($this->getRequestParameter('etime_title'));
         $etime->setStartDate(strtotime($this->getRequestParameter('start_date') . ' ' . $this->getRequestParameter('start_date_time')));
         $etime->setEndDate(strtotime($this->getRequestParameter('end_date') . ' ' . $this->getRequestParameter('end_date_time')));
         $etime->setAllDay($this->getRequestParameter('all_day') ? $this->getRequestParameter('all_day') : false);
         $etime->setLocation($this->getRequestParameter('location'));
         $etime->setDescription($this->getRequestParameter('etime_description'));
         $etime->setNotes($this->getRequestParameter('etime_notes'));
         $etime->setCapacity($this->getRequestParameter('capacity') ? $this->getRequestParameter('capacity') : null);
         $etime->setAdditionalGuests($this->getRequestParameter('additional_guests') ? $this->getRequestParameter('additional_guests') : 0);
         $etime->setHasFee($this->getRequestParameter('has_fee') ? $this->getRequestParameter('has_fee') : false);
         $etime->setAudioVisualSupport($this->getRequestParameter('audio_visual_support') ? $this->getRequestParameter('audio_visual_support') : false);
         //      $etime->setOrganiser($this->getRequestParameter('etime_organiser'));
         //      $etime->setInterestedParties($this->getRequestParameter('etime_interested_parties'));
         $etime->save();
         // Update many-to-many for "etime_rsvp"
         $c = new Criteria();
         $c->add(EtimeRsvpPeer::ETIME_ID, $etime->getPrimaryKey());
         EtimeRsvpPeer::doDelete($c);
         $ids = $this->getRequestParameter('associated_etime_rsvp');
         if (is_array($ids)) {
             foreach ($ids as $id) {
                 $EtimeRsvp = new EtimeRsvp();
                 $EtimeRsvp->setEtime($etime);
                 $EtimeRsvp->setRsvpId($id);
                 $EtimeRsvp->save();
             }
         }
         // Update many-to-many for "etime_audience"
         $c = new Criteria();
         $c->add(EtimeAudiencePeer::ETIME_ID, $etime->getPrimaryKey());
         EtimeAudiencePeer::doDelete($c);
         $ids = $this->getRequestParameter('associated_etime_audience');
         if (is_array($ids)) {
             foreach ($ids as $id) {
                 $EtimeAudience = new EtimeAudience();
                 $EtimeAudience->setEtime($etime);
                 $EtimeAudience->setAudienceId($id);
                 $EtimeAudience->save();
             }
         }
         if ($this->getRequestParameter('tag_string')) {
             TagTools::recordTags($this->getRequestParameter('tag_string'), "event", $event);
         }
         if ($this->getRequestParameter('etime_tag_string')) {
             TagTools::recordTags($this->getRequestParameter('etime_tag_string'), "etime", $etime);
         }
         return $this->redirect('@show_event?slug=' . $event->getSlug());
     }
     return sfView::SUCCESS;
 }
开发者ID:soon0009,项目名称:EMS,代码行数:72,代码来源:actions.class.php


注:本文中的Event::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。