Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/plugin/zoom/lib/UserMeetingRegistrant.php

51 lines
1.1 KiB

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
use Chamilo\UserBundle\Entity\User;
use Exception;
/**
* Class UserMeetingRegistrant. Used to register a local user to a meeting.
*
* @package Chamilo\PluginBundle\Zoom
*/
class UserMeetingRegistrant extends API\MeetingRegistrant
{
use UserMeetingRegistrantTrait;
/**
* {@inheritdoc}
*
* @throws Exception
*/
public function initializeExtraProperties()
{
parent::initializeExtraProperties();
$this->decodeAndRemoveTag();
$this->computeFullName();
}
/**
* Creates a UserMeetingRegistrant instance from a user.
*
* @param User $user
*
* @throws Exception
*
* @return static
*/
public static function fromUser($user)
{
$instance = new static();
$instance->email = $user->getEmail();
$instance->first_name = $user->getFirstname();
$instance->last_name = $user->getLastname();
$instance->userId = $user->getId();
$instance->user = $user;
$instance->computeFullName();
return $instance;
}
}