本文整理汇总了PHP中Meeting类的典型用法代码示例。如果您正苦于以下问题:PHP Meeting类的具体用法?PHP Meeting怎么用?PHP Meeting使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Meeting类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testDuration_set_get
public function testDuration_set_get()
{
$meeting = new Meeting();
$duration = 3;
$meeting->setDuration($duration);
$this->assertEquals($duration, $meeting->getDuration());
}
开发者ID:NixWord,项目名称:hoursync,代码行数:7,代码来源:Meeting.php
示例2: delete
function delete($id = FALSE)
{
if ($id) {
$meeting = new Meeting($id);
$meeting->delete();
set_notify('success', lang('delete_data_complete'));
}
redirect('meetings');
}
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:9,代码来源:meetings.php
示例3: testFindPlaceFor
public function testFindPlaceFor()
{
$this->hoursync->addCalendarURI(self::VALID_CALENDAR_URI);
$this->hoursync->loadCalendars();
$meeting = new Meeting();
$meeting->setFrequency(Meeting::WEEKLY);
$meeting->setDuration(2);
$place = $this->hoursync->findPlaceFor($meeting);
$this->assertNotEquals($place, false);
}
开发者ID:NixWord,项目名称:hoursync,代码行数:10,代码来源:HourSync.php
示例4: testEndDateChange
public function testEndDateChange()
{
$meetingsSql = "UPDATE meetings AS a INNER JOIN meetings AS b ON a.id = b.id SET a.date_end = date_add(b.date_start, INTERVAL + concat(b.duration_hours, b.duration_minutes) HOUR_MINUTE) WHERE a.id = '{$this->_meetingId}'";
$GLOBALS['db']->query($meetingsSql);
$meeting = new Meeting();
$meeting->disable_row_level_security = true;
$meeting->retrieve($this->_meetingId);
$meeting->fixUpFormatting();
$this->assertEquals($meeting->date_end, '2010-10-12 00:15:00', 'Ensuring that the end_date is saved properly as a date time field');
}
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug39757Test.php
示例5: setUp
public function setUp()
{
global $current_user, $currentModule;
$mod_strings = return_module_language($GLOBALS['current_language'], "Meetings");
$current_user = SugarTestUserUtilities::createAnonymousUser();
$meeting = new Meeting();
$meeting->id = uniqid();
$meeting->name = 'Test Meeting';
$meeting->save();
$this->meeting = $meeting;
}
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:11,代码来源:MeetingTest.php
示例6: createMeeting
public static function createMeeting($id = '')
{
$time = mt_rand();
$name = 'Meeting';
$meeting = new Meeting();
$meeting->name = $name . $time;
if (!empty($id)) {
$meeting->new_with_id = true;
$meeting->id = $id;
}
$meeting->save();
self::$_createdMeetings[] = $meeting;
return $meeting;
}
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:14,代码来源:SugarTestMeetingUtilities.php
示例7: createNewMeeting
protected function createNewMeeting()
{
$m = new Meeting();
$m->name = "40541TestMeeting";
$m->date_start = gmdate($GLOBALS['timedate']->get_db_date_time_format(), time() + 3000);
$m->duration_hours = 0;
$m->duration_minutes = 15;
$m->reminder_time = 60;
$m->reminder_checked = true;
$m->save();
$m->load_relationship("users");
$m->users->add($this->_user->id);
$this->beans[] = $m;
return $m;
}
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:15,代码来源:JSAlertsTest.php
示例8: getMeetingDatetime
/**
* A method to return the datetime of meeting associated with the note
* @return string the datetime
*/
function getMeetingDatetime()
{
# If this note has a meeting associated with it
if ($this->MeetingId != 0) {
require_once 'Meeting.php';
# Get the meeting object
$meeting = new Meeting($this->MeetingId);
# Get datetime and return it in user friendly format
$meetingDatetime = $meeting->getDatetime();
return DatetimeConverter::getUserFriendlyDateTimeFormat($meetingDatetime);
# Otherwise return an empty string
} else {
return "";
}
}
开发者ID:emilcieslar,项目名称:student-supervisor,代码行数:19,代码来源:Note.php
示例9: toTableRow
public function toTableRow($day)
{
// sets the character to print out for Open or Closed
$open_char = "C";
if ($this->open) {
$open_char = 'O';
}
// adds the meeting codes to the end of the meeting name
$newname = Meeting::addToName($this->name);
// combines address pieces together to create a whole address
$wholeaddress = $this->address . ", " . $this->city . " WA " . $this->zipcode;
// adds the last update date at the end of the meeting notes
if ($this->notes == "") {
$newnotes = $this->notes . "Info Last Updated: " . $this->lupdate;
} else {
$newnotes = $this->notes . "; Info Last Updated: " . $this->lupdate;
}
// creates a String of the meeting info as an HTML table row and returns it
$htmlstring = "<tr><td class=\"oc\">{$day}</td>";
// day, input as parameter
$htmlstring = $htmlstring . "<td data-value=\"{$this->stime_num}\">{$this->stime}</td>";
// String start time with numeric data-value for sorting
$htmlstring = $htmlstring . "<td class=\"oc\">{$open_char}</td><td>{$newname}</td>";
// O or C
// street name and number but link to apple maps of whole address
// used apple maps, as if it's a non apple device it automatically goes to google maps
$htmlstring = $htmlstring . "<td><a target=\"_blank\" href=\"http://maps.apple.com/?q={$wholeaddress}\">{$this->address}</a>";
$htmlstring = $htmlstring . "</td><td>{$this->city}</td>";
// city
$htmlstring = $htmlstring . "<td>{$newnotes}</td></tr>";
// notes
return $htmlstring;
}
开发者ID:mathteacher,项目名称:12sml,代码行数:33,代码来源:meetingclass.php
示例10: resolveUpdateScoreTypeByModel
protected static function resolveUpdateScoreTypeByModel($model)
{
if ($model->category->value == Meeting::getCategoryCallValue()) {
return static::SCORE_TYPE_UPDATE_CALL;
}
return parent::resolveUpdateScoreTypeByModel($model);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:MeetingGamificationRules.php
示例11: testLoad
public function testLoad()
{
$this->assertEquals(2, Group::getCount());
$this->assertEquals(0, Role::getCount());
$this->assertEquals(0, Account::getCount());
$this->assertEquals(0, Contact::getCount());
$this->assertEquals(0, Opportunity::getCount());
$this->assertEquals(0, Meeting::getCount());
$this->assertEquals(0, Note::getCount());
$this->assertEquals(0, Task::getCount());
$this->assertEquals(1, User::getCount());
$this->assertEquals(0, ProductCatalog::getCount());
$this->assertEquals(0, ProductCategory::getCount());
$this->assertEquals(0, ProductTemplate::getCount());
$this->assertEquals(0, Product::getCount());
$messageLogger = new MessageLogger();
DemoDataUtil::unsetLoadedModules();
DemoDataUtil::load($messageLogger, 3);
$this->assertEquals(8, Group::getCount());
$this->assertEquals(3, Role::getCount());
$this->assertEquals(3, Account::getCount());
$this->assertEquals(16, Contact::getCount());
$this->assertEquals(6, Opportunity::getCount());
$this->assertEquals(18, Meeting::getCount());
$this->assertEquals(12, Note::getCount());
$this->assertEquals(9, Task::getCount());
$this->assertEquals(10, User::getCount());
$this->assertEquals(1, ProductCatalog::getCount());
$this->assertEquals(6, ProductCategory::getCount());
$this->assertEquals(32, ProductTemplate::getCount());
$this->assertEquals(59, Product::getCount());
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:32,代码来源:DemoDataUtilTest.php
示例12: createMeeting
public static function createMeeting($id = '')
{
$time = mt_rand();
$name = 'Meeting';
$meeting = new Meeting();
$meeting->name = $name . $time;
$meeting->date_start = $GLOBALS['timedate']->getNow()->asDb();
$meeting->duration_hours = '0';
$meeting->duration_minutes = '15';
if (!empty($id)) {
$meeting->new_with_id = true;
$meeting->id = $id;
}
$meeting->save();
self::$_createdMeetings[] = $meeting;
return $meeting;
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:17,代码来源:SugarTestMeetingUtilities.php
示例13: createMeetingWithOwnerAndRelatedAccount
public static function createMeetingWithOwnerAndRelatedAccount($name, $owner, $account)
{
$startStamp = DateTimeUtil::convertTimestampToDbFormatDateTime(time() + 10000);
$endStamp = DateTimeUtil::convertTimestampToDbFormatDateTime(time() + 11000);
$meeting = new Meeting();
$meeting->name = $name;
$meeting->owner = $owner;
$meeting->location = 'my location';
$meeting->category->value = 'Call';
$meeting->startDateTime = $startStamp;
$meeting->endDateTime = $endStamp;
$meeting->description = 'my test description';
$meeting->activityItems->add($account);
$saved = $meeting->save();
assert('$saved');
return $meeting;
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:17,代码来源:MeetingTestHelper.php
示例14: __construct
/**
* MeetingInfo constructor.
* @param $xml \SimpleXMLElement
*/
public function __construct($xml)
{
parent::__construct($xml);
$this->internalMeetingId = $xml->internalMeetingID->__toString();
$this->isRecording = $xml->recording->__toString() == 'true';
$this->startTime = doubleval($xml->startTime);
$this->endTime = doubleval($xml->endTime);
$this->maxUsers = $xml->maxUsers->__toString() + 0;
$this->moderatorCount = $xml->moderatorCount->__toString() + 0;
}
开发者ID:bigbluebutton,项目名称:bigbluebutton-api-php,代码行数:14,代码来源:MeetingInfo.php
示例15: testSimpleUserImportWhereAllRowsSucceed
public function testSimpleUserImportWhereAllRowsSucceed()
{
Yii::app()->user->userModel = User::getByUsername('super');
$meetings = Meeting::getAll();
$this->assertEquals(0, count($meetings));
$import = new Import();
$serializedData['importRulesType'] = 'Meetings';
$serializedData['firstRowIsHeaderRow'] = true;
$import->serializedData = serialize($serializedData);
$this->assertTrue($import->save());
ImportTestHelper::createTempTableByFileNameAndTableName('importAnalyzerTest.csv', $import->getTempTableName(), true, Yii::getPathOfAlias('application.modules.meetings.tests.unit.files'));
$this->assertEquals(4, ImportDatabaseUtil::getCount($import->getTempTableName()));
// includes header rows.
$mappingData = array('column_0' => ImportMappingUtil::makeStringColumnMappingData('name'), 'column_1' => ImportMappingUtil::makeStringColumnMappingData('location'), 'column_2' => ImportMappingUtil::makeDateTimeColumnMappingData('startDateTime'), 'column_3' => ImportMappingUtil::makeDateTimeColumnMappingData('endDateTime'), 'column_4' => ImportMappingUtil::makeDropDownColumnMappingData('category'), 'column_5' => ImportMappingUtil::makeModelDerivedColumnMappingData('AccountDerived'), 'column_6' => ImportMappingUtil::makeModelDerivedColumnMappingData('ContactDerived'), 'column_7' => ImportMappingUtil::makeModelDerivedColumnMappingData('OpportunityDerived'), 'column_8' => ImportMappingUtil::makeTextAreaColumnMappingData('description'));
$importRules = ImportRulesUtil::makeImportRulesByType('Meetings');
$page = 0;
$config = array('pagination' => array('pageSize' => 50));
//This way all rows are processed.
$dataProvider = new ImportDataProvider($import->getTempTableName(), true, $config);
$dataProvider->getPagination()->setCurrentPage($page);
$importResultsUtil = new ImportResultsUtil($import);
$messageLogger = new ImportMessageLogger();
ImportUtil::importByDataProvider($dataProvider, $importRules, $mappingData, $importResultsUtil, new ExplicitReadWriteModelPermissions(), $messageLogger);
$importResultsUtil->processStatusAndMessagesForEachRow();
//Confirm that 3 models where created.
$meetings = Meeting::getAll();
$this->assertEquals(3, count($meetings));
$meetings = Meeting::getByName('meeting1');
$this->assertEquals(1, count($meetings[0]));
$this->assertEquals(1, count($meetings[0]->activityItems));
$this->assertEquals('testAccount', $meetings[0]->activityItems[0]->name);
$this->assertEquals('Account', get_class($meetings[0]->activityItems[0]));
$this->assertEquals('2011-12-22 05:03', substr($meetings[0]->latestDateTime, 0, -3));
$meetings = Meeting::getByName('meeting2');
$this->assertEquals(1, count($meetings[0]));
$this->assertEquals(1, count($meetings[0]->activityItems));
$this->assertEquals('testContact', $meetings[0]->activityItems[0]->firstName);
$this->assertEquals('Contact', get_class($meetings[0]->activityItems[0]));
$this->assertEquals('2011-12-22 05:03', substr($meetings[0]->latestDateTime, 0, -3));
$meetings = Meeting::getByName('meeting3');
$this->assertEquals(1, count($meetings[0]));
$this->assertEquals(1, count($meetings[0]->activityItems));
$this->assertEquals('testOpportunity', $meetings[0]->activityItems[0]->name);
$this->assertEquals('Opportunity', get_class($meetings[0]->activityItems[0]));
$this->assertEquals('2011-12-22 06:03', substr($meetings[0]->latestDateTime, 0, -3));
//Confirm 10 rows were processed as 'created'.
$this->assertEquals(3, ImportDatabaseUtil::getCount($import->getTempTableName(), "status = " . ImportRowDataResultsUtil::CREATED));
//Confirm that 0 rows were processed as 'updated'.
$this->assertEquals(0, ImportDatabaseUtil::getCount($import->getTempTableName(), "status = " . ImportRowDataResultsUtil::UPDATED));
//Confirm 2 rows were processed as 'errors'.
$this->assertEquals(0, ImportDatabaseUtil::getCount($import->getTempTableName(), "status = " . ImportRowDataResultsUtil::ERROR));
$beansWithErrors = ImportDatabaseUtil::getSubset($import->getTempTableName(), "status = " . ImportRowDataResultsUtil::ERROR);
$this->assertEquals(0, count($beansWithErrors));
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:54,代码来源:MeetingImportTest.php
示例16: testMeetingsThanSpanForMoreThanOneMonth
public function testMeetingsThanSpanForMoreThanOneMonth()
{
$savedCalendars = SavedCalendar::getByName('aSavedCalendar');
$savedCalendar = $savedCalendars[0];
$meetings = Meeting::getByName('aMeeting');
$meeting = $meetings[0];
$meeting->startDateTime = '2014-04-29 01:00:00';
$meeting->endDateTime = '2014-05-09 01:00:00';
$this->assertTrue($meeting->save());
$savedCalendarSubscriptions = SavedCalendarSubscriptions::makeByUser($this->super, (string) $savedCalendar->id);
$dataProvider = new CalendarItemsDataProvider($savedCalendarSubscriptions, array('startDate' => '2014-05-01 01:00:00', 'endDate' => '2014-05-31 01:00:00', 'dateRangeType' => SavedCalendar::DATERANGE_TYPE_MONTH));
$data = $dataProvider->getData();
$this->assertCount(1, $data);
$this->assertEquals('aMeeting', $data[0]->getTitle());
$meeting->startDateTime = '2014-04-29 01:00:00';
$meeting->endDateTime = '2014-06-09 01:00:00';
$this->assertTrue($meeting->save());
$savedCalendarSubscriptions = SavedCalendarSubscriptions::makeByUser($this->super, (string) $savedCalendar->id);
$dataProvider = new CalendarItemsDataProvider($savedCalendarSubscriptions, array('startDate' => '2014-05-01 01:00:00', 'endDate' => '2014-05-31 01:00:00', 'dateRangeType' => SavedCalendar::DATERANGE_TYPE_MONTH));
$data = $dataProvider->getData();
$this->assertCount(1, $data);
$this->assertEquals('aMeeting', $data[0]->getTitle());
$meeting->startDateTime = '2014-05-29 01:00:00';
$meeting->endDateTime = '2014-06-09 01:00:00';
$this->assertTrue($meeting->save());
$savedCalendarSubscriptions = SavedCalendarSubscriptions::makeByUser($this->super, (string) $savedCalendar->id);
$dataProvider = new CalendarItemsDataProvider($savedCalendarSubscriptions, array('startDate' => '2014-05-01 01:00:00', 'endDate' => '2014-05-31 01:00:00', 'dateRangeType' => SavedCalendar::DATERANGE_TYPE_MONTH));
$data = $dataProvider->getData();
$this->assertCount(1, $data);
$this->assertEquals('aMeeting', $data[0]->getTitle());
//Meeting start and ends before calendar start/end dates
$savedCalendarSubscriptions = SavedCalendarSubscriptions::makeByUser($this->super, (string) $savedCalendar->id);
$dataProvider = new CalendarItemsDataProvider($savedCalendarSubscriptions, array('startDate' => '2014-07-01 01:00:00', 'endDate' => '2014-08-31 01:00:00', 'dateRangeType' => SavedCalendar::DATERANGE_TYPE_MONTH));
$data = $dataProvider->getData();
$this->assertCount(0, $data);
//Meeting start and ends after calendar start/end dates
$savedCalendarSubscriptions = SavedCalendarSubscriptions::makeByUser($this->super, (string) $savedCalendar->id);
$dataProvider = new CalendarItemsDataProvider($savedCalendarSubscriptions, array('startDate' => '2014-01-01 01:00:00', 'endDate' => '2014-03-31 01:00:00', 'dateRangeType' => SavedCalendar::DATERANGE_TYPE_MONTH));
$data = $dataProvider->getData();
$this->assertCount(0, $data);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:41,代码来源:CalendarItemsDataProviderTest.php
示例17: init
public function init()
{
if (ContactsModule::shouldUpdateLatestActivityDateTimeWhenATaskIsCompleted()) {
$eventHandler = array($this, 'updateContactLatestActivityDateTimeByTask');
Task::model()->attachEventHandler('onAfterSave', $eventHandler);
$this->attachedEventHandlersIndexedByModelClassName['Task'] = array('onAfterSave', $eventHandler);
}
if (ContactsModule::shouldUpdateLatestActivityDateTimeWhenANoteIsCreated()) {
$eventHandler = array($this, 'updateContactLatestActivityDateTimeByNote');
Note::model()->attachEventHandler('onAfterSave', $eventHandler);
$this->attachedEventHandlersIndexedByModelClassName['Note'] = array('onAfterSave', $eventHandler);
}
if (ContactsModule::shouldUpdateLatestActivityDateTimeWhenAnEmailIsSentOrArchived()) {
$eventHandler = array($this, 'updateContactLatestActivityDateTimeByEmailMessage');
EmailMessage::model()->attachEventHandler('onAfterSave', $eventHandler);
$this->attachedEventHandlersIndexedByModelClassName['EmailMessage'] = array('onAfterSave', $eventHandler);
}
if (ContactsModule::shouldUpdateLatestActivityDateTimeWhenAMeetingIsInThePast()) {
$eventHandler = array($this, 'resolveModelLatestActivityDateTimeProcessFlagByMeeting');
Meeting::model()->attachEventHandler('onBeforeSave', $eventHandler);
$this->attachedEventHandlersIndexedByModelClassName['Meeting'] = array('onBeforeSave', $eventHandler);
}
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:23,代码来源:ContactLatestActivityDateTimeObserver.php
示例18: getPreviousMeeting
/**
* A method to get a meeting that is before the one that is provided as a parameter
* @param Meeting $meeting the meeting after the one that should be returned
* @return Meeting|null the previous meeting
*/
public static function getPreviousMeeting($meeting)
{
# Get database connection
$objPDO = PDOFactory::get();
# Get project ID from session
$projectId = HTTPSession::getInstance()->PROJECT_ID;
# Get the previous meeting, which we can recognize by
# 1. datetime of that meeting is less than meeting provided
# 2. Meeting is not deleted, however can be cancelled, because we might look for a meeting that was cancelled
# 3. Meeting is approved
$strQuery = "SELECT id FROM Meeting WHERE project_id = :project_id\n AND datetime < (SELECT datetime FROM Meeting WHERE id = " . $meeting->getID() . ")\n AND is_deleted = 0\n AND is_approved = 1\n ORDER BY datetime DESC\n LIMIT 1";
$objStatement = $objPDO->prepare($strQuery);
$objStatement->bindValue(':project_id', $projectId, PDO::PARAM_INT);
$objStatement->execute();
# Define empty variable
$prevMeeting = null;
# Get the previous meeting if it exists
if ($row = $objStatement->fetch(PDO::FETCH_ASSOC)) {
$prevMeeting = new Meeting($row['id']);
}
# The previous meeting
return $prevMeeting;
}
开发者ID:emilcieslar,项目名称:student-supervisor,代码行数:28,代码来源:MeetingFactory.php
示例19: die
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
require_once "modules/ECalendar/SaveInvitees.php";
require_once "modules/ECalendar/functions.php";
if ($_REQUEST['cur_module'] == 'Calls') {
require_once "modules/Calls/Call.php";
$bean = new Call();
$type = 'call';
$table_name = 'calls';
$jn = "call_id_c";
}
if ($_REQUEST['cur_module'] == 'Meetings') {
require_once "modules/Meetings/Meeting.php";
$bean = new Meeting();
$type = 'meeting';
$table_name = 'meetings';
$jn = "meeting_id_c";
}
if (!empty($_REQUEST['record'])) {
$bean->retrieve($_REQUEST['record']);
}
if (!$bean->ACLAccess('Save')) {
$json_arr = array('succuss' => 'no');
echo json_encode($json_arr);
die;
}
$bean->name = $_REQUEST['name'];
$bean->date_start = $_REQUEST['date_start'];
$bean->date_end = $_REQUEST['date_start'];
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:30,代码来源:AjaxSave.php
示例20: testUpdateLatestActivityDateTimeWhenAMeetingIsInThePast
public function testUpdateLatestActivityDateTimeWhenAMeetingIsInThePast()
{
$meeting = new Meeting();
$meeting->name = 'my meeting';
$meeting->startDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time() - 86400);
$this->assertNull($meeting->processedForLatestActivity);
$meeting->processedForLatestActivity = true;
$this->assertTrue($meeting->save());
$this->assertTrue($meeting->processedForLatestActivity == false);
$meeting->processedForLatestActivity = true;
$this->assertTrue($meeting->save());
$this->assertTrue($meeting->processedForLatestActivity == true);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:AccountLatestActivityDateTimeDocumentationTest.php
注:本文中的Meeting类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论