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


PHP Summit::ActiveSummitID方法代码示例

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


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

示例1: 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

示例2: run

 /**
  * @return void
  */
 public function run()
 {
     try {
         $init_time = time();
         $summit_id = Summit::ActiveSummitID();
         if (isset($_GET['summit_id'])) {
             $summit_id = intval(trim(Convert::raw2sql($_GET['summit_id'])));
             echo sprintf('summit_id set to %s', $summit_id) . PHP_EOL;
         }
         $manager = Injector::inst()->get('SummitVenueRoomMetricsManager');
         $manager->ingest($summit_id);
         $finish_time = time() - $init_time;
         echo 'time elapsed : ' . $finish_time . ' seconds.' . PHP_EOL;
     } catch (Exception $ex) {
         SS_Log::log($ex->getMessage(), SS_Log::ERR);
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:20,代码来源:RoomMetricsIngestionTask.php

示例3: SummitEntityEvent

    $event = new SummitEntityEvent();
    $event->EntityClassName = 'MySchedule';
    $event->EntityID = $item->ID;
    $event->Type = 'INSERT';
    $event->OwnerID = $attendee->MemberID;
    $event->SummitID = $summit_id;
    $event->Metadata = $metadata;
    $event->write();
});
PublisherSubscriberManager::getInstance()->subscribe('manymanylist_removed_item', function ($list, $item) {
    if (!$item instanceof ISummitEvent) {
        return;
    }
    $summit_id = $item->getField("SummitID");
    if (is_null($summit_id) || $summit_id == 0) {
        $summit_id = Summit::ActiveSummitID();
    }
    $metadata = '';
    $join_table = $list->getJoinTable();
    if ($join_table !== 'SummitAttendee_Schedule') {
        return;
    }
    $attendee_id = $list->getForeignID();
    $attendee = SummitAttendee::get()->byID($attendee_id);
    $event = new SummitEntityEvent();
    $event->EntityClassName = 'MySchedule';
    $event->EntityID = $item->ID;
    $event->Type = 'DELETE';
    $event->OwnerID = $attendee->MemberID;
    $event->SummitID = $summit_id;
    $event->Metadata = $metadata;
开发者ID:rbowen,项目名称:openstack-org,代码行数:31,代码来源:_config.php


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