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.
38 lines
755 B
38 lines
755 B
![]()
7 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
|
|
||
|
/**
|
||
|
* Class HookCreateCourse.
|
||
|
*/
|
||
|
class HookCreateCourse extends HookEvent implements HookCreateCourseEventInterface
|
||
|
{
|
||
|
/**
|
||
|
* HookCreateCourse constructor.
|
||
|
*
|
||
|
* @throws Exception
|
||
|
*/
|
||
|
protected function __construct()
|
||
|
{
|
||
|
parent::__construct('HookCreateCourse');
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Update all the observers.
|
||
|
*
|
||
|
* @param int $type
|
||
|
*
|
||
|
* @return int
|
||
|
*/
|
||
|
public function notifyCreateCourse($type)
|
||
|
{
|
||
|
$this->eventData['type'] = $type;
|
||
|
|
||
|
/** @var HookCreateCourseObserverInterface $observer */
|
||
|
foreach ($this->observers as $observer) {
|
||
|
$observer->hookCreateCourse($this);
|
||
|
}
|
||
|
|
||
|
return 1;
|
||
|
}
|
||
|
}
|