• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Summit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createSummit

 /**
  * @param array $data
  * @return ISummit
  */
 public function createSummit(array $data)
 {
     $this_var = $this;
     $repository = $this->summit_repository;
     $factory = $this->summit_factory;
     return $this->tx_manager->transaction(function () use($this_var, $factory, $data, $repository) {
         $summit = new Summit();
         $summit->registerMainInfo($factory->buildMainInfo($data));
         if ($repository->isDuplicated($summit)) {
             throw new EntityAlreadyExistsException('Summit', sprintf('Name %s', $summit->getName()));
         }
         $repository->add($summit);
         return $summit;
     });
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:19,代码来源:SummitManager.php


示例2: init

 /**
  * Check for auth tokens
  * @return mixed
  */
 public function init()
 {
     parent::init();
     if (!Summit::get_active()->isInDB()) {
         return $this->httpError(404, 'There is no active summit');
     }
     /**
      * On the existing tokenauthentication system, this is a fairly trivialmatter, and I'm not so sure it's anything to navigate right now.
      * Thiswas implemented to provide the video upload people a simple API foradding videos. It's a very specific use c
      * ase, and general users shouldnot be using it. If they can and they are, then that needs to bechanged.
      */
     $result = $this->checkAuthenticationToken();
     if (!$result && !Member::currentUser()) {
         //check if speaker registration token is present..
         $speaker_registration_token = $this->request->getVar(SpeakerRegistrationRequest::ConfirmationTokenParamName);
         if (!is_null($speaker_registration_token)) {
             $request = $this->speaker_registration_request_repository->getByConfirmationToken($speaker_registration_token);
             if (is_null($request) || $request->alreadyConfirmed()) {
                 return SummitSecurity::permission_failure($this);
             }
             // redirect to register member speaker
             $url = Controller::join_links(Director::baseURL(), 'summit-login', 'registration');
             return $this->redirect($url . '?BackURL=' . urlencode($this->request->getURL()) . '&' . SpeakerRegistrationRequest::ConfirmationTokenParamName . '=' . $speaker_registration_token);
         }
         return SummitSecurity::permission_failure($this);
     }
     $speaker = Member::currentUser()->getSpeakerProfile();
     if (!$speaker) {
         $speaker = PresentationSpeaker::create(array('MemberID' => Member::currentUserID(), 'FirstName' => Member::currentUser()->FirstName, 'LastName' => Member::currentUser()->Surname));
         $speaker->write();
     }
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:36,代码来源:PresentationPage.php


示例3: getCMSFields

 public function getCMSFields()
 {
     $summit_id = isset($_REQUEST['SummitID']) ? $_REQUEST['SummitID'] : Summit::ActiveSummitID();
     Requirements::javascript('summit/javascript/SummitPushNotification.js');
     $f = new FieldList($rootTab = new TabSet("Root", $tabMain = new Tab('Main')));
     $f->addFieldToTab('Root.Main', $txt = new TextareaField('Message', 'Message'));
     $txt->setAttribute('required', 'true');
     $f->addFieldToTab('Root.Main', $ddl_channel = new DropdownField('Channel', 'Channel', singleton('SummitPushNotification')->dbObject('Channel')->enumValues()));
     $f->addFieldToTab('Root.Main', $ddl_events = new DropdownField('EventID', 'Event', SummitEvent::get()->filter(['Published' => 1, 'SummitID' => $summit_id])->sort('Title', 'ASC')->Map('ID', 'FormattedTitle')));
     $f->addFieldToTab('Root.Main', $ddl_groups = new DropdownField('GroupID', 'Group', Group::get()->sort('Title', 'ASC')->Map('ID', 'Title')));
     $f->addFieldToTab('Root.Main', new HiddenField('SummitID', 'SummitID'));
     $ddl_channel->setEmptyString('--SELECT A CHANNEL--');
     $ddl_channel->setAttribute('required', 'true');
     $ddl_events->setEmptyString('--SELECT AN EVENT--');
     $ddl_events->addExtraClass('hidden');
     $ddl_groups->setEmptyString('--SELECT A GROUP--');
     $ddl_groups->addExtraClass('hidden');
     $config = GridFieldConfig_RelationEditor::create(50);
     $config->removeComponentsByType('GridFieldAddExistingAutocompleter');
     $config->removeComponentsByType('GridFieldAddNewButton');
     $config->addComponent($auto_completer = new CustomGridFieldAddExistingAutocompleter('buttons-before-right'));
     $auto_completer->setResultsFormat('$Title ($Email)');
     $recipients = new GridField('Recipients', 'Member Recipients', $this->Recipients(), $config);
     $f->addFieldToTab('Root.Main', $recipients);
     return $f;
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:26,代码来源:SummitPushNotification.php


示例4: build

 /**
  * @param IPresentationSpeaker $speaker
  * @return PresentationSpeakerAcceptedAnnouncementEmailSender
  * @throws Exception
  */
 public function build(IPresentationSpeaker $speaker)
 {
     $summit = Summit::get_active();
     $has_approved = $speaker->hasApprovedPresentations($summit->ID);
     $has_rejected = $speaker->hasRejectedPresentations($summit->ID);
     $has_alternate = $speaker->hasAlternatePresentations($summit->ID);
     if ($has_approved && !$has_rejected && !$has_alternate) {
         return new PresentationSpeakerAcceptedAnnouncementEmailSender();
     }
     if (!$has_approved && !$has_rejected && $has_alternate) {
         return new PresentationSpeakerAlternateAnnouncementEmailSender();
     }
     if (!$has_approved && $has_rejected && !$has_alternate) {
         return new PresentationSpeakerRejectedAnnouncementEmailSender();
     }
     if ($has_approved && !$has_rejected && $has_alternate) {
         return new PresentationSpeakerAcceptedAlternateAnnouncementEmailSender();
     }
     if ($has_approved && $has_rejected && !$has_alternate) {
         return new PresentationSpeakerAcceptedRejectedAnnouncementEmailSender();
     }
     if (!$has_approved && $has_rejected && $has_alternate) {
         return new PresentationSpeakerAlternateRejectedAnnouncementEmailSender();
     }
     if ($has_approved && $has_rejected && $has_alternate) {
         return new PresentationSpeakerAcceptedAlternateAnnouncementEmailSender();
     }
     return null;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:34,代码来源:SpeakerSelectionAnnouncementEmailSenderFactory.php


示例5: presentations

 /**
  * @param SS_HTTPRequest $r
  */
 public function presentations(SS_HTTPRequest $r)
 {
     $data = [];
     $speaker = null;
     $key = $r->getVar('key');
     if ($key) {
         $username = PresentationSpeaker::hash_to_username($key);
         $speaker = PresentationSpeaker::get()->filter('Member.Email', $username)->first();
     } elseif ($speakerID = Session::get('UploadMedia.SpeakerID')) {
         $speaker = PresentationSpeaker::get()->byID($speakerID);
     }
     // Speaker not found
     if (!$speaker) {
         return $this->httpError(404, 'Sorry, that does not appear to be a valid token.');
     }
     Session::set('UploadMedia.SpeakerID', $speaker->ID);
     $mostRecentSummit = Summit::get_most_recent();
     $presentations = $speaker->PublishedPresentations($mostRecentSummit->ID);
     // No presentations
     if (!$presentations->exists()) {
         return $this->httpError(404, 'Sorry, it does not appear that you have any presentations.');
     }
     // IF there's only one presentation with no media, go ahead and forward to it's page
     if ($presentations->count() == 1) {
         $slide = $presentations->first()->MaterialType('PresentationSlide');
         if (!$slide) {
             $presentationID = $presentations->first()->ID;
             return $this->redirect(Controller::join_links($this->Link(), '/presentation/', $presentationID, 'upload'));
         }
     }
     $data['Speaker'] = $speaker;
     $data['Presentations'] = $presentations;
     return $this->customise($data);
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:37,代码来源:PresentationSlideSubmissionController.php


示例6: getNextAvailableByType

 /**
  * @param string $promo_code_type
  * @param int $batch_size
  * @return ISpeakerSummitRegistrationPromoCode
  */
 public function getNextAvailableByType($promo_code_type, $batch_size = 10)
 {
     switch ($promo_code_type) {
         case ISpeakerSummitRegistrationPromoCode::TypeAccepted:
             if (count($this->promo_code_speaker_session_pool) === 0) {
                 $query = new QueryObject(new SpeakerSummitRegistrationPromoCode());
                 $query->addAndCondition(QueryCriteria::equal('Type', $promo_code_type));
                 $query->addAndCondition(QueryCriteria::equal('OwnerID', 0));
                 $query->addAndCondition(QueryCriteria::equal('SpeakerID', 0));
                 $query->addAndCondition(QueryCriteria::equal('SummitID', Summit::get_active()->ID));
                 $query->addOrder(QueryOrder::asc('ID'));
                 list($this->promo_code_speaker_session_pool, $count) = $this->getAll($query, 0, $batch_size);
             }
             return array_shift($this->promo_code_speaker_session_pool);
             break;
         case ISpeakerSummitRegistrationPromoCode::TypeAlternate:
             if (count($this->promo_code_alternate_speaker_session_pool) === 0) {
                 $query = new QueryObject(new SpeakerSummitRegistrationPromoCode());
                 $query->addAndCondition(QueryCriteria::equal('Type', $promo_code_type));
                 $query->addAndCondition(QueryCriteria::equal('OwnerID', 0));
                 $query->addAndCondition(QueryCriteria::equal('SpeakerID', 0));
                 $query->addAndCondition(QueryCriteria::equal('SummitID', Summit::get_active()->ID));
                 $query->addOrder(QueryOrder::asc('ID'));
                 list($this->promo_code_alternate_speaker_session_pool, $count) = $this->getAll($query, 0, $batch_size);
             }
             return array_shift($this->promo_code_alternate_speaker_session_pool);
             break;
     }
     return null;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:35,代码来源:SapphireSpeakerSummitRegistrationPromoCodeRepository.php


示例7: handleGetAllPresentations

 public function handleGetAllPresentations(SS_HTTPRequest $r)
 {
     $limit = $r->getVar('limit') ?: 50;
     if ($limit > 50) {
         $limit = 50;
     }
     $start = $r->getVar('page') ?: 0;
     $presentations = Member::currentUser() ? Member::currentUser()->getRandomisedPresentations() : Presentation::get()->filter(array('SummitEvent.SummitID' => Summit::get_active()->ID));
     if ($r->getVar('category')) {
         $presentations = $presentations->filter('CategoryID', (int) $r->getVar('category'));
     }
     if ($r->getVar('keyword')) {
         $k = $r->getVar('keyword');
         $presentations = $presentations->filterAny(array('Title:PartialMatch' => $k, 'Description:PartialMatch' => $k, 'Speakers.FirstName:PartialMatch' => $k, 'Speakers.LastName:PartialMatch' => $k));
     }
     if ($r->getVar('voted') == "true") {
         $presentations = $presentations->leftJoin("PresentationVote", "PresentationVote.PresentationID = Presentation.ID")->where("IFNULL(PresentationVote.MemberID,0) = " . Member::currentUserID());
     }
     if ($r->getVar('voted') == "false") {
         $presentations = $presentations->leftJoin("PresentationVote", "PresentationVote.PresentationID = Presentation.ID")->where("IFNULL(PresentationVote.MemberID,0) != " . Member::currentUserID());
     }
     $count = $presentations->count();
     $presentations = $presentations->limit($limit, $start * $limit);
     $data = array('results' => array(), 'has_more' => $count > $limit * ($start + 1), 'total' => $count, 'remaining' => $count - $limit * ($start + 1));
     foreach ($presentations as $p) {
         $data['results'][] = array('id' => $p->ID, 'title' => $p->Title, 'user_vote' => $p->getUserVote() ? $p->getUserVote()->Vote : null);
     }
     return (new SS_HTTPResponse(Convert::array2json($data), 200))->addHeader('Content-Type', 'application/json');
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:29,代码来源:PresentationAPI.php


示例8: run

 /**
  * @return void
  */
 public function run()
 {
     try {
         $batch_size = 100;
         $init_time = time();
         $summit = null;
         if (isset($_GET['batch_size'])) {
             $batch_size = intval(trim(Convert::raw2sql($_GET['batch_size'])));
             echo sprintf('batch_size set to %s', $batch_size) . PHP_EOL;
         }
         if (isset($_GET['summit_id'])) {
             $summit = Summit::get()->byID(intval($_GET['summit_id']));
         }
         if (is_null($summit)) {
             throw new Exception('summit_id is not valid!');
         }
         $manager = Injector::inst()->get('SpeakerSecondBreakoutAnnouncementSenderManager');
         if (!$manager instanceof ISpeakerSecondBreakoutAnnouncementSenderManager) {
             return;
         }
         $processed = $manager->send($summit, $batch_size);
         $finish_time = time() - $init_time;
         echo 'processed records ' . $processed . ' - time elapsed : ' . $finish_time . ' seconds.';
     } catch (Exception $ex) {
         SS_Log::log($ex->getMessage(), SS_Log::ERR);
     }
 }
开发者ID:hogepodge,项目名称:openstack-org,代码行数:30,代码来源:SpeakerSecondBreakoutEmailSenderTask.php


示例9: run

 /**
  * @return void
  */
 public function run()
 {
     try {
         $init_time = time();
         $processed_events = 0;
         $events = array();
         $current_summit = Summit::get_active();
         if ($current_summit) {
             $events = $current_summit->getSchedule();
         }
         foreach ($events as $event) {
             $processed_events++;
             $rate_sum = 0;
             $rate_count = 0;
             foreach ($event->Feedback as $feedback) {
                 $rate_count++;
                 $rate_sum = $rate_sum + $feedback->Rate;
             }
             $rate_avg = $rate_count > 0 ? $rate_sum / $rate_count : 0;
             try {
                 $event->setAvgRate(round($rate_avg, 2));
                 $event->write(true);
             } catch (Exception $ex) {
                 SS_Log::log($ex, SS_Log::ERR);
                 echo $ex->getMessage();
             }
         }
         $finish_time = time() - $init_time;
         echo 'processed events ' . $processed_events . ' - time elapsed : ' . $finish_time . ' seconds.';
     } catch (Exception $ex) {
         SS_Log::log($ex->getMessage(), SS_Log::ERR);
     }
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:36,代码来源:SummitEventSetAvgRate.php


示例10: getPresentationFields

 protected function getPresentationFields()
 {
     $categorySource = Summit::ActiveSummit()->Categories()->map('ID', 'FormattedTitleAndDescription')->toArray();
     $categorySource['other'] = '<h4 class="category-label">Other topic...</h4>';
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('Level', 'Please select the level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->literal('AbstractHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. We will take the first 100 characters of your abstract to display in the YouTube description.</p>')->tinyMCEEditor('ShortDescription', 'Abstract (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('ProblemAddressed', 'What is the problem or use case you’re addressing in this session? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('AttendeesExpectedLearnt', 'What should attendees expect to learn? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('SelectionMotive', 'Why should this session be selected? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->literal('PresentationMaterialsTitle', '<h3>Please provide any relevant links to additional information, such as code repositories, case studies, papers, blog posts etc. (Up to 5 links)</h3>')->text('PresentationLink[1]', '#1')->text('PresentationLink[2]', '#2')->text('PresentationLink[3]', '#3')->text('PresentationLink[4]', '#4')->text('PresentationLink[5]', '#5')->literal('HR', '<hr/>')->optionset('CategoryID', 'What is the general topic of the presentation?')->configure()->setSource($categorySource)->end()->text('OtherTopic', 'Other topic (if one above does not match)')->configure()->displayIf('CategoryID')->isEqualTo('other')->end()->end()->hidden('ID', 'ID');
     return $fields;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:7,代码来源:PresentationForm.php


示例11: handleAddDefaultEventTypes

 public function handleAddDefaultEventTypes($grid, $request, $data = null)
 {
     $summit_id = intval($request->param('ID'));
     if ($summit_id > 0 && ($summit = Summit::get()->byID($summit_id))) {
         Summit::seedBasicEventTypes($summit_id);
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:7,代码来源:GridFieldAddDefaultEventTypes.php


示例12: getUpcomingSummitAttendee

 /**
  * @return ISummitAttendee|null
  */
 public function getUpcomingSummitAttendee()
 {
     $upcoming_summit = Summit::ActiveSummit();
     if ($upcoming_summit) {
         return $this->getSummitAttendee($upcoming_summit->ID);
     }
     return null;
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:11,代码来源:AttendeeMember.php


示例13: CurrentSummit

 public function CurrentSummit()
 {
     $current_summit = Summit::CurrentSummit();
     if (is_null($current_summit)) {
         $current_summit = $this->UpcomingSummit();
     }
     return $current_summit;
 }
开发者ID:rbowen,项目名称:openstack-org,代码行数:8,代码来源:EditProfilePageSummitAttendeeExtension.php


示例14: up

 function up()
 {
     echo "Starting Migration Proc ...<BR>";
     //check if migration already had ran ...
     $migration = Migration::get()->filter('Name', $this->title)->first();
     $promo_code_type = isset($_REQUEST['promo_code_type']) ? intval($_REQUEST['promo_code_type']) : null;
     $promo_code_file = isset($_REQUEST['promo_code_file']) ? $_REQUEST['promo_code_file'] : null;
     if (is_null($promo_code_type)) {
         echo 'ERROR - promo_code_type param missing!';
         exit;
     }
     if (is_null($promo_code_file)) {
         echo 'ERROR - promo_code_file param missing!';
         exit;
     }
     $base_path = ASSETS_PATH;
     $file_path = $base_path . '/' . $promo_code_file;
     $type = explode(".", $file_path);
     if (!strtolower(end($type)) == 'csv') {
         echo 'ERROR - file hast not a csv extension!';
         exit;
     }
     if (!file_exists($file_path)) {
         echo sprintf('ERROR - %s file does not exists!', $file_path);
         exit;
     }
     $reader = new CSVReader($file_path);
     $row = 0;
     do {
         $line = $reader->getLine();
         if ($line) {
             ++$row;
             if ($row === 1) {
                 continue;
             }
             // skip header ...
             switch ($promo_code_type) {
                 case 1:
                     $type = 'ACCEPTED';
                     break;
                 case 2:
                     $type = 'ALTERNATE';
                     break;
             }
             $code = new SpeakerSummitRegistrationPromoCode();
             $code->Code = $line[0];
             $code->Type = $type;
             $code->SummitID = Summit::get_active()->ID;
             try {
                 $code->write();
             } catch (Exception $ex) {
                 SS_Log::log($ex->getMessage(), SS_Log::ERR);
             }
         }
     } while ($line);
     echo "Ending  Migration Proc ...<BR>";
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:57,代码来源:SummitPromoRegistrationCodesLoaderTask.php


示例15: send

 /**
  * @param $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send($subject)
 {
     $email_template = PermamailTemplate::get_by_identifier(SUMMIT_ATTENDEE_CREATE_MEMBERSHIP_INVITATION_EMAIL_TEMPLATE);
     if (is_null($email_template)) {
         return;
     }
     $email = EmailFactory::getInstance()->buildEmail(null, $subject);
     $email->setUserTemplate('summit-attendee-create-membership-invitation')->populateTemplate(array('Email' => $subject, 'Summit' => Summit::get_active()))->send();
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:14,代码来源:SummitAttendeeCreateMembershipAnnouncementEmailSender.php


示例16: getPresentationFields

 protected function getPresentationFields()
 {
     $categorySource = Summit::get_active()->Categories()->map('ID', 'FormattedTitleAndDescription')->toArray();
     $categorySource['other'] = '<h4 class="category-label">Other topic...</h4>';
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('Level', 'Please select the level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->tinyMCEEditor('Description', 'Abstract')->configure()->setRows(20)->end()->literal('ShortDescriptionHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. Please provide a shorter, YouTube-friendly summary below.</p>')->literal('ShortDescriptionWordCount', '<p id="word-count"></p>')->tinyMCEEditor('ShortDescription', 'Short Description (450 Word Max)')->configure()->setRows(7)->setWordCount(450)->end()->literal('HR', '<hr/>')->optionset('CategoryID', 'What is the general topic of the presentation?')->configure()->setSource($categorySource)->end()->text('OtherTopic', 'Other topic (if one above does not match)')->configure()->displayIf('CategoryID')->isEqualTo('other')->end()->end()->literal('TagHelp', '<p>You can optionally add tags help attendees find presentations that interest them. Examples: <i>nova, ubuntu, ldap.</i></p>')->bootstrapTag('Tags', 'Presentation Tags (Optional)')->configure()->setLabelField('Tag')->setSource(Tag::get())->setPrefetch(Tag::get()->leftJoin('Presentation_Tags', 'TagID = Tag.ID')->sort('COUNT(Tag.ID)', 'DESC')->limit(10)->alterDataQuery(function ($query) {
         $query->groupby('Tag.ID');
     }))->setFreeInput(true)->end();
     return $fields;
 }
开发者ID:rbowen,项目名称:openstack-org,代码行数:9,代码来源:PresentationForm.php


示例17: send

 /**
  * @param IEntity $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send(IEntity $subject)
 {
     if (!$subject instanceof IPresentationSpeaker) {
         return;
     }
     $subject->registerAnnouncementEmailTypeSent(IPresentationSpeaker::AnnouncementEmailAlternate);
     $email = EmailFactory::getInstance()->buildEmail('[email protected]', $subject->getEmail());
     $email->setUserTemplate('presentation-speaker-alternate-only')->populateTemplate(array('Speaker' => $subject, 'ConfirmationLink' => $subject->getSpeakerConfirmationLink(), 'ScheduleMainPageLink' => Summit::get_active()->SchedUrl, 'PromoCode' => $subject->getSummitPromoCode()->getCode()))->send();
 }
开发者ID:rbowen,项目名称:openstack-org,代码行数:14,代码来源:PresentationSpeakerAlternateAnnouncementEmailSender.php


示例18: send

 /**
  * @param mixed $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send($subject)
 {
     if (!$subject instanceof IPresentationSpeaker) {
         return;
     }
     $summit = Summit::get_active();
     $subject->registerAnnouncementEmailTypeSent(IPresentationSpeaker::AnnouncementEmailRejected, $summit->ID);
     $email = EmailFactory::getInstance()->buildEmail('[email protected]', $subject->getEmail());
     $email->setUserTemplate('presentation-speaker-rejected-only')->populateTemplate(array('Speaker' => $subject))->send();
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:15,代码来源:PresentationSpeakerRejectedAnnouncementEmailSender.php


示例19: trackChairCheck

 function trackChairCheck()
 {
     $member = Member::currentUser();
     $chair = new SummitTrackChair();
     if ($member) {
         $chair = SummitTrackChair::get()->filter(array('MemberID' => $member->ID, 'SummitID' => Summit::get_active()->ID));
     }
     if ($chair->exists() || Permission::check('ADMIN')) {
         return true;
     }
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:11,代码来源:TrackChairsPage.php


示例20: send

 /**
  * @param $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send($subject)
 {
     if (!$subject instanceof ISummitAttendee) {
         return;
     }
     $email_template = PermamailTemplate::get_by_identifier(SUMMIT_ATTENDEE_CREATED_EMAIL_TEMPLATE);
     if (is_null($email_template)) {
         return;
     }
     $email = EmailFactory::getInstance()->buildEmail(null, $subject->getMember()->getEmail());
     $email->setUserTemplate('summit-attendee-created')->populateTemplate(array('Attendee' => $subject, 'Summit' => Summit::get_active()))->send();
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:17,代码来源:SummitAttendeeCreatedAnnouncementEmailSender.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Supplier类代码示例发布时间:2022-05-23
下一篇:
PHP Sugar_Smarty类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap