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


PHP Event::getEvent方法代码示例

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


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

示例1: __construct

 public function __construct($scenario = '', $id = null)
 {
     if ($scenario == 'view' && $id != null) {
         $this->event = Event::getEvent($id);
         if ($this->event != null) {
             $this->postItem = $this->event->postItem;
             if (Yii::app()->user->isCollegeAdmin()) {
                 $this->isPublic = $this->event->college_id == null;
             }
         } else {
             throw new CHttpException(400, 'Cannot found the event post.');
         }
     } else {
         $this->_new();
     }
 }
开发者ID:aakbar24,项目名称:CollegeCorner_Ver_2.0,代码行数:16,代码来源:EventForm.php

示例2: _parseXML

 /**
  *
  */
 protected function _parseXML()
 {
     $xml_block = $this->_xml->xpath("//page[@id='" . $this->_page . "']");
     if (!$xml_block) {
         trigger_error('Page block "' . $this->_page . '" was not set in pages.xml file!', E_USER_ERROR);
         return false;
     }
     $data = array(\App::option('website.resources_param') => null, \App::option('website.lang_param') => null, \App::option('website.data_param') => null, \App::option('website.meta_tags_param') => Manager::getMetaTags(), \App::option('website.router_param') => new models\Router($this->_page));
     //$data[ \App::option( 'website.current_route_param' ) . 'raw' ] =
     //		( Manager::currentRoute( ) && Manager::getLang( 'suffix' ) ) ?
     //			str_replace( '_' . Manager::getLang( 'suffix' ) , '' ,  Manager::currentRoute( ) ) : null;
     $views = $xml_block[0]->views->view;
     if ($resources = $xml_block[0]->resources) {
         $blocks = array();
         foreach ($resources[0] as $block) {
             $blocks[] = (string) $block;
         }
         $data[\App::option('website.resources_param')] = new models\Resources($blocks, $this->_page);
     }
     $data[\App::option('website.lang_param')] = $this->_getTranslator();
     $params = array($this->_page, &$data[\App::option('website.data_param')], $data[\App::option('website.lang_param')]);
     if ($call = (string) $xml_block[0]->attributes()->callback) {
         \Event::listen('view.callback', $call);
     }
     $events = \Event::getEvent('view');
     if (@$events['callback']) {
         \Event::fire('view.callback', $params);
     }
     $elements = $this->_xml->xpath("//elements");
     if ($elements) {
         $storage = array();
         foreach ($elements[0]->element as $element) {
             $storage[(string) $element->attributes()->name] = (string) $element;
         }
         $data[\App::option('website.elements_param')] = new models\Elements($storage, $data);
     }
     $view = \View::make(\App::option('website.views_path') . '/' . $views[0], $data);
     if (count($views) > 1) {
         unset($views[0]);
         foreach ($views as $file) {
             $child = (string) $file->attributes()->child;
             $view = $view->nest($child, \App::option('website.views_path') . '/' . $file, $view->getPageVars());
         }
     }
     return $view;
 }
开发者ID:ifsale,项目名称:fluid-php-website-helper,代码行数:49,代码来源:Page.php

示例3: sendRegistrationMail

 protected function sendRegistrationMail($eventMail, $event, $gender, $name, $email, $age, $club, $adress, $category, $message)
 {
     $ev = new Event();
     $eve = $ev->getEvent($event);
     $content = "<h1>{$eve['title']} - nová p?ihláška</h1>";
     $content .= "Jméno: {$name}";
     if ($gender != "") {
         $content .= "Pohlaví: {$gender}<br>";
     }
     if ($age != "") {
         $content .= "Ro?ník: {$age}<br>";
     }
     if ($club != "") {
         $content .= "Klub: {$club}<br>";
     }
     if ($adress != "") {
         $content .= "Adresa: {$adress}<br>";
     }
     if ($category != "") {
         $content .= "Kategorie: {$category}<br>";
     }
     if ($message != "") {
         $content .= "Zpráva: {$message}<br>";
     }
     $content .= "<a href='" . $_SERVER['HTTP_HOST'] . "/index.php?page=calendar_enroll_admin&id={$event}'>Zobrazit p?ihlášky</a>";
     //Email information
     $admin_email = $eventMail;
     $subject = "Tiary - Nová p?ihláška";
     $comment = $content;
     $header = "From: ununik@gmail.com\r\n";
     $header .= "MIME-Version: 1.0\r\n";
     $header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
     $header .= "X-Priority: 1\r\n";
     //send email
     mail($admin_email, "{$subject}", $comment, $header);
 }
开发者ID:ununik,项目名称:tiary,代码行数:36,代码来源:Enroll.class.php

示例4: Event

<?php

/**
 * Created by PhpStorm.
 * User: ununik
 * Date: 03.09.2015
 * Time: 13:06
 */
$eventDB = new Event();
$event = $eventDB->getEvent($_GET['id']);
$enrollDB = $eventDB->getEnroll($_GET['id'], $event['author']);
$mainTitle = $event['title'];
$subscription = nl2br($event['subscription']);
$place = nl2br($event['place']);
$update = 0;
$type = $eventDB->getType($event['type']);
$type = $type['cz'];
$enroll = $event['enroll'];
$time = time();
$starttimestamp = $enrollDB['starttimestamp'];
$startEnroll = date("j. n. Y", $starttimestamp);
if ($event['timestamp1'] == $event['timestamp2'] || $event['timestamp2'] == 0) {
    $date = date("j. n. Y", $event['timestamp1']);
} else {
    $date = date("j. n. Y", $event['timestamp1']) . ' - ' . date("j. n. Y", $event['timestamp2']);
}
if ($event['organisator'] != "") {
    $organisator = $event['organisator'];
} else {
    $organisator = new Profil($event['id_organisator']);
    $organisator = $organisator->getName();
开发者ID:ununik,项目名称:tiary,代码行数:31,代码来源:calendar_event.php

示例5: serialize

 /**
  * @param Event $inflated
  * @return array
  */
 public function serialize($inflated)
 {
     $class = get_class($inflated->getEvent());
     return ['occurred' => $inflated->getOccurred()->format('c'), 'event' => ['type' => (string) new \watoki\reflect\type\ClassType($class), 'value' => $this->getSerializer($class)->serialize($inflated->getEvent())]];
 }
开发者ID:rtens,项目名称:ucdi,代码行数:9,代码来源:EventSerialilzer.php

示例6: Connection

<?php

require "../bcause-core2.php";
$con = new Connection();
$id = $_GET['id'];
$event = new Event($con);
$event_data = $event->getEvent($id);
$json_output = $event->getEventChildrenJSON($con, 1, 0);
print $json_output;
开发者ID:devgona,项目名称:reframe,代码行数:9,代码来源:api2.php

示例7: Event

 * Date: 04.09.2015
 * Time: 14:44
 */
$OptionsAll = new Event();
$options = "";
$gender = 1;
$name = 1;
$email = 1;
$year = 1;
$club = 1;
$adress = 0;
$category = 0;
$link = "";
$day = date("j. n. Y");
$hour = date("H:i");
$event = $OptionsAll->getEvent($_GET['id']);
$categories = (include_once "controllers/log/calendar/enroll-setting-category.php");
if (isset($_POST['form'])) {
    if (isset($_POST['gender']) && $_POST['gender'] == 1) {
        $gender = 1;
    } else {
        $gender = 0;
    }
    if (isset($_POST['name']) && $_POST['name'] == 1) {
        $name = 1;
    } else {
        $name = 0;
    }
    if (isset($_POST['email']) && $_POST['email'] == 1) {
        $email = 1;
    } else {
开发者ID:ununik,项目名称:tiary,代码行数:31,代码来源:calendar_new_event_enrollSystemSetting.php

示例8: getEventChildrenJSON

 public function getEventChildrenJSON($con, $max_degree, $child)
 {
     $name = $this->name;
     $id = $this->id;
     $event_children = $this->getEventChildren($id);
     $degree = 0;
     $json_output = '';
     if (isset($name)) {
         # montando o metadata
         foreach ($event_children as $ec) {
             if ($ec->quote == '') {
                 $ec->quote = "(no quote yet)";
             }
             $metadata[$ec->event_id] = "'{$ec->quote}' - <a href='{$ec->report_link}'>{$ec->report_news_source}</a>";
             if (isset($metadata_insert[$ec->event_id])) {
                 $metadata_insert[$ec->event_id] = $metadata_insert[$ec->event_id] . "</br>" . $metadata[$ec->event_id];
             } else {
                 $metadata_insert[$ec->event_id] = $metadata[$ec->event_id];
             }
         }
         $run = 0;
         $ids_done = array();
         $printed_once = 0;
         foreach ($event_children as $ecc) {
             if ($printed_once == 0 && $child == 0) {
                 $json_output = "{\n\"name\": \"{$name}\",\n\"quote\": \"\",\n\"children\": [";
                 $printed_once = 1;
             }
             //print_r($ecc);
             if (!in_array($ecc->event_id, $ids_done)) {
                 if ($ecc->quote == '') {
                     $ecc->quote = "(no quote yet)";
                 }
                 if ($run > 0) {
                     $json_output .= ",";
                 }
                 $mt = $metadata_insert[$ecc->event_id];
                 $json_output .= "{\n                \"name\": \"{$ecc->event_name}\",\n                \"url\": \"node.php?id={$ecc->event_id}\",\n                \"news_url\": \"{$ecc->report_link}\",\n                \"quote\": \"{$ecc->quote}\",\n                \"metadata\": \"{$mt}\",\n                \"children\": [";
                 # Running sub-children
                 $children_output = '';
                 if ($degree < $max_degree) {
                     $event2 = new Event($con);
                     $event2_data = $event2->getEvent($ecc->event_id);
                     # Passando o filho tb: se for filho, nao ha necessidade de printar de novo
                     $children_output = $event2->getEventChildrenJSON($con, $max_degree--, 1);
                     //print "AAA: $ecc->event_id\n $children_output\n\n\n";
                 }
                 $json_output .= $children_output;
                 # Continuando com o parent
                 $json_output .= "]\n                    }";
                 $run++;
                 $ids_done[] = $ecc->event_id;
             }
         }
         if ($printed_once == 1) {
             $json_output .= "]\n            }";
         }
     } else {
         $json_output = '';
     }
     return $json_output;
 }
开发者ID:devgona,项目名称:reframe,代码行数:62,代码来源:bcause-core2-no-password.php

示例9: attachEvent

 public function attachEvent(Event $event)
 {
     $this->cal->setComponent($event->getEvent());
     return $this;
 }
开发者ID:shokohsc,项目名称:IcalBundle,代码行数:5,代码来源:Calendar.php


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