當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PHPWS_Core::initModclass方法代碼示例

本文整理匯總了PHP中PHPWS_Core::initModclass方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHPWS_Core::initModclass方法的具體用法?PHP PHPWS_Core::initModclass怎麽用?PHP PHPWS_Core::initModclass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PHPWS_Core的用法示例。


在下文中一共展示了PHPWS_Core::initModclass方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute

 public function execute(CommandContext $context)
 {
     if (!Current_User::allow('withdrawn_search')) {
         PHPWS_Core::initModClass('hms', 'exception/PermissionException.php');
         throw new PermissionException('You do not have permission to makr applications withdrawn.');
     }
     $id = $context->get('appId');
     if (!isset($id) || is_null($id)) {
         throw new InvalidArugumentException('Missing application id.');
     }
     PHPWS_Core::initModclass('hms', 'HousingApplicationFactory.php');
     $app = HousingApplicationFactory::getApplicationById($context->get('appId'));
     $app->setWithdrawn(1);
     $app->save();
     NQ::simple('hms', hms\NotificationView::SUCCESS, 'Application successfully marked as withdrawn.');
     $context->goBack();
 }
開發者ID:jlbooker,項目名稱:homestead,代碼行數:17,代碼來源:MarkApplicationWithdrawnCommand.php

示例2: send_roommate_reminder_emails

 public static function send_roommate_reminder_emails($term)
 {
     PHPWS_Core::initModClass('hms', 'HMS_Bed.php');
     PHPWS_Core::initModclass('hms', 'StudentFactory.php');
     // Get a list of outstanding roommate requests, send them reminder emails
     $query = "select hms_lottery_reservation.* FROM hms_lottery_reservation\n                LEFT OUTER JOIN (SELECT asu_username FROM hms_assignment WHERE term={$term} AND lottery = 1) as foo ON hms_lottery_reservation.asu_username = foo.asu_username\n                WHERE foo.asu_username IS NULL\n                AND hms_lottery_reservation.expires_on > " . time();
     $result = PHPWS_DB::getAll($query);
     if (PEAR::isError($result)) {
         PHPWS_Error::log($result);
         test($result, 1);
     }
     $year = Term::toString($term) . ' - ' . Term::toString(Term::getNextTerm($term));
     foreach ($result as $row) {
         $student = StudentFactory::getStudentByUsername($row['asu_username'], $term);
         $requestor = StudentFactory::getStudentByUsername($row['requestor'], $term);
         $bed = new HMS_Bed($row['bed_id']);
         $hall_room = $bed->where_am_i();
         HMS_Email::send_lottery_roommate_reminder($row['asu_username'], $student->getName(), $row['expires_on'], $requestor->getName(), $hall_room, $year);
         HMS_Activity_Log::log_activity($row['asu_username'], ACTIVITY_LOTTERY_ROOMMATE_REMINDED, 'hms');
     }
 }
開發者ID:jlbooker,項目名稱:homestead,代碼行數:21,代碼來源:HMS_Lottery.php


注:本文中的PHPWS_Core::initModclass方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。