本文整理汇总了PHP中Institution::addRequestFromUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Institution::addRequestFromUser方法的具体用法?PHP Institution::addRequestFromUser怎么用?PHP Institution::addRequestFromUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Institution
的用法示例。
在下文中一共展示了Institution::addRequestFromUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_institution_request
public function add_institution_request($institution, $studentid = null)
{
if (empty($institution) || $institution == 'mahara') {
return;
}
require_once 'institution.php';
$institution = new Institution($institution);
$institution->addRequestFromUser($this, $studentid);
}
示例2: Institution
function mahara_institution_decline_members($client)
{
//Set test data
$dbuser1 = $this->create_user1_for_update();
$dbuser2 = $this->create_user2_for_update();
$this->clean_institution();
$institution = new Institution($this->testinstitution);
$institution->addRequestFromUser($dbuser1);
$institution->addRequestFromUser($dbuser2);
$dbinvites = get_records_array('usr_institution_request', 'institution', $this->testinstitution);
$this->assertEquals(2, count($dbinvites));
//update the users by web service
$function = 'mahara_institution_decline_members';
$params = array('institution' => $this->testinstitution, 'users' => array(array('id' => $dbuser1->id), array('id' => $dbuser2->id)));
$client->call($function, $params);
$dbinvites = get_records_array('usr_institution_request', 'institution', $this->testinstitution);
$this->assertTrue(empty($dbinvites));
}