Actualización
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface CheckLoginCredentialsHookEventInterface.
|
||||
*/
|
||||
interface CheckLoginCredentialsHookEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Call to all observers.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function notifyLoginCredentials();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface CheckLoginCredentialsHookObserverInterface.
|
||||
*/
|
||||
interface CheckLoginCredentialsHookObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function checkLoginCredentials(CheckLoginCredentialsHookEventInterface $event);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookAdminBlockEventInterface.
|
||||
*/
|
||||
interface HookAdminBlockEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyAdminBlock($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookAdminBlockObserverInterface.
|
||||
*/
|
||||
interface HookAdminBlockObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookAdminBlock(HookAdminBlockEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookConditionalLoginEventInterface.
|
||||
*/
|
||||
interface HookConditionalLoginEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Call Conditional Login hooks.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notifyConditionalLogin();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookConditionalLoginObserverInterface.
|
||||
*/
|
||||
interface HookConditionalLoginObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* Return an associative array (callable, url) needed for Conditional Login.
|
||||
* <code>
|
||||
* [
|
||||
* 'conditional_function' => function (array $userInfo) {},
|
||||
* 'url' => '',
|
||||
* ]
|
||||
* </code>
|
||||
* conditional_function returns false to redirect to the url and returns true to continue with the classical login.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function hookConditionalLogin(HookConditionalLoginEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookCreateUserEventInterface.
|
||||
*/
|
||||
interface HookCreateCourseEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Update all the observers.
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyCreateCourse($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface CreateUserHookInterface.
|
||||
*/
|
||||
interface HookCreateCourseObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookCreateCourse(HookCreateCourseEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookCreateUserEventInterface.
|
||||
*/
|
||||
interface HookCreateUserEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Update all the observers.
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyCreateUser($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface CreateUserHookInterface.
|
||||
*/
|
||||
interface HookCreateUserObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookCreateUser(HookCreateUserEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookDocumentActionEventInterface.
|
||||
*/
|
||||
interface HookDocumentActionEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param $type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyDocumentAction($type);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookDocumentActionObserverInterface.
|
||||
*/
|
||||
interface HookDocumentActionObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookDocumentActionEventInterface $hookvent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyDocumentAction(HookDocumentActionEventInterface $hookvent);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookDocumentItemActionEventInterface.
|
||||
*/
|
||||
interface HookDocumentItemActionEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param $type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyDocumentItemAction($type);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookDocumentItemActionObserverInterface.
|
||||
*/
|
||||
interface HookDocumentItemActionObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookDocumentItemActionEventInterface $hookvent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyDocumentItemAction(HookDocumentItemActionEventInterface $hookvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookDocumentItemViewEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyDocumentItemView(): array;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookDocumentItemViewObserverInterface.
|
||||
*/
|
||||
interface HookDocumentItemViewObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function notifyDocumentItemView(HookDocumentItemViewEventInterface $hookvent): string;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookLearningPathCreatedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyCreated();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookLearningPathCreatedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookCreated(HookLearningPathCreatedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookLearningPathEndEventInterface.
|
||||
*/
|
||||
interface HookLearningPathEndEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookLearningPathEnd();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookLearningPathEndObserverInterface.
|
||||
*/
|
||||
interface HookLearningPathEndObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function notifyLearningPathEnd(HookLearningPathEndEventInterface $event);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookLearningPathItemViewedEventInterface.
|
||||
*/
|
||||
interface HookLearningPathItemViewedEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyLearningPathItemViewed();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookLearningPathItemViewedObserverInterface.
|
||||
*/
|
||||
interface HookLearningPathItemViewedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookLearningPathItemViewedEventInterface $event
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookLearningPathItemViewed(HookLearningPathItemViewedEventInterface $event);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookMyStudentsLpTrackingEventInterface.
|
||||
*/
|
||||
interface HookMyStudentsLpTrackingEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function notifyTrackingHeader();
|
||||
|
||||
/**
|
||||
* @param int $lpId
|
||||
* @param int $studentId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notifyTrackingContent($lpId, $studentId);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookMyStudentsLpTrackingObserverInterface.
|
||||
*/
|
||||
interface HookMyStudentsLpTrackingObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* Return an associative array this value and attributes.
|
||||
* <code>
|
||||
* [
|
||||
* 'value' => 'Users online',
|
||||
* 'attrs' => ['class' => 'text-center'],
|
||||
* ]
|
||||
* </code>.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function trackingHeader(HookMyStudentsLpTrackingEventInterface $hook);
|
||||
|
||||
/**
|
||||
* Return an associative array this value and attributes.
|
||||
* <code>
|
||||
* [
|
||||
* 'value' => '5 connected users ',
|
||||
* 'attrs' => ['class' => 'text-center text-success'],
|
||||
* ]
|
||||
* </code>.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function trackingContent(HookMyStudentsLpTrackingEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookMyStudentsQuizTrackingEventInterface.
|
||||
*/
|
||||
interface HookMyStudentsQuizTrackingEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function notifyTrackingHeader();
|
||||
|
||||
/**
|
||||
* @param int $quizId
|
||||
* @param int $studentId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notifyTrackingContent($quizId, $studentId);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookMyStudentsQuizTrackingObserverInterface.
|
||||
*/
|
||||
interface HookMyStudentsQuizTrackingObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* Return an associative array this value and attributes.
|
||||
* <code>
|
||||
* [
|
||||
* 'value' => 'Users online',
|
||||
* 'attrs' => ['class' => 'text-center'],
|
||||
* ]
|
||||
* </code>.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function trackingHeader(HookMyStudentsQuizTrackingEventInterface $hook);
|
||||
|
||||
/**
|
||||
* Return an associative array this value and attributes.
|
||||
* <code>
|
||||
* [
|
||||
* 'value' => '5 connected users ',
|
||||
* 'attrs' => ['class' => 'text-center text-success'],
|
||||
* ]
|
||||
* </code>.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function trackingContent(HookMyStudentsQuizTrackingEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains Hook event interface for notification content.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookNotificationContentEventInterface.
|
||||
*/
|
||||
interface HookNotificationContentEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param int $type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notifyNotificationContent($type);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains Hook observer interface for notification content.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookNotificationContentObserverInterface.
|
||||
*/
|
||||
interface HookNotificationContentObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function hookNotificationContent(HookNotificationContentEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains Hook event interface for notification title.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookNotificationTitleEventInterface.
|
||||
*/
|
||||
interface HookNotificationTitleEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param int $type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function notifyNotificationTitle($type);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains Hook observer interface for notification title.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookNotificationTitleObserverInterface.
|
||||
*/
|
||||
interface HookNotificationTitleObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function hookNotificationTitle(HookNotificationTitleEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioCommentEditedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyCommentEdited();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioCommentEditedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookCommentEdited(HookPortfolioCommentEditedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioCommentScoredEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyCommentScored();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioCommentScoredObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookCommentScored(HookPortfolioCommentScoredEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioDownloadedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyPortfolioDownloaded();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioDownloadedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookPortfolioDownloaded(HookPortfolioDownloadedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookPortfolioItemAddedEventInterface.
|
||||
*/
|
||||
interface HookPortfolioItemAddedEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function notifyItemAdded();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookPortfolioItemAddedObserverInterface.
|
||||
*/
|
||||
interface HookPortfolioItemAddedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookPortfolioItemAddedEventInterface $hookEvent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookItemAdded(HookPortfolioItemAddedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookPortfolioItemCommentedEventInterface.
|
||||
*/
|
||||
interface HookPortfolioItemCommentedEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function notifyItemCommented();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookPortfolioItemCommentedObserverInterface.
|
||||
*/
|
||||
interface HookPortfolioItemCommentedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookPortfolioItemCommentedEventInterface $hookEvent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookItemCommented(HookPortfolioItemCommentedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemDeletedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyItemDeleted();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemDeletedHookObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookItemDeleted(HookPortfolioItemDeletedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemEditedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyItemEdited();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemEditedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookItemEdited(HookPortfolioItemEditedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemHighlightedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyItemHighlighted();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemHighlightedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookItemHighlighted(HookPortfolioItemHighlightedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemScoredEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyItemScored();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemScoredObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookItemScored(HookPortfolioItemScoredEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemViewedEventInterface extends HookEventInterface
|
||||
{
|
||||
public function notifyItemViewed(): void;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemViewedObserverInterface extends HookObserverInterface
|
||||
{
|
||||
public function hookItemViewed(HookPortfolioItemViewedEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemVisibilityEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function notifyItemVisibility();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
interface HookPortfolioItemVisibilityObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function hookItemVisibility(HookPortfolioItemVisibilityEventInterface $event);
|
||||
}
|
||||
13
main/inc/lib/hook/interfaces/HookQuizEndEventInterface.php
Normal file
13
main/inc/lib/hook/interfaces/HookQuizEndEventInterface.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookQuizEndEventInterface.
|
||||
*/
|
||||
interface HookQuizEndEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function notifyQuizEnd();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookQuizEndObserverInterface.
|
||||
*/
|
||||
interface HookQuizEndObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookQuizEndEventInterface $hookEvent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookQuizEnd(HookQuizEndEventInterface $hookEvent);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookQuizQuestionAnsweredEventInterface.
|
||||
*/
|
||||
interface HookQuizQuestionAnsweredEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function notifyQuizQuestionAnswered();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Interface HookQuizQuestionAnsweredObserverInterface.
|
||||
*/
|
||||
interface HookQuizQuestionAnsweredObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param \HookQuizQuestionAnsweredEventInterface $event
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function hookQuizQuestionAnswered(HookQuizQuestionAnsweredEventInterface $event);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookResubscribeEventInterface.
|
||||
*/
|
||||
interface HookResubscribeEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Update all the observers.
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyResubscribe($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface ResubscribeHookInterface.
|
||||
*/
|
||||
interface HookResubscribeObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookResubscribe(HookResubscribeEventInterface $hook);
|
||||
}
|
||||
23
main/inc/lib/hook/interfaces/HookSkypeEventInterface.php
Normal file
23
main/inc/lib/hook/interfaces/HookSkypeEventInterface.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookSkypeEventInterface.
|
||||
*/
|
||||
interface HookSkypeEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Update all the observers.
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifySkype($type);
|
||||
}
|
||||
21
main/inc/lib/hook/interfaces/HookSkypeObserverInterface.php
Normal file
21
main/inc/lib/hook/interfaces/HookSkypeObserverInterface.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface SkypeHookInterface.
|
||||
*/
|
||||
interface HookSkypeObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @param HookSkypeObserverInterface $hook
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function hookEventSkype(HookSkypeEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookUpdateUserEventInterface.
|
||||
*/
|
||||
interface HookUpdateUserEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Update all the observers.
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyUpdateUser($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface UpdateUserHookInterface.
|
||||
*/
|
||||
interface HookUpdateUserObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookUpdateUser(HookUpdateUserEventInterface $hook);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookWSRegistrationEventInterface.
|
||||
*/
|
||||
interface HookWSRegistrationEventInterface extends HookEventInterface
|
||||
{
|
||||
/**
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function notifyWSRegistration($type);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookWSRegistrationObserverInterface.
|
||||
*/
|
||||
interface HookWSRegistrationObserverInterface extends HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function hookWSRegistration(HookWSRegistrationEventInterface $hook);
|
||||
}
|
||||
76
main/inc/lib/hook/interfaces/base/HookEventInterface.php
Normal file
76
main/inc/lib/hook/interfaces/base/HookEventInterface.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* Interface HookEventInterface.
|
||||
*/
|
||||
interface HookEventInterface
|
||||
{
|
||||
/**
|
||||
* Attach an HookObserver.
|
||||
*
|
||||
* @see http://php.net/manual/en/splsubject.attach.php
|
||||
*
|
||||
* @param \HookObserverInterface| $observer <p>
|
||||
* The <b>HookObserver</b> to attach.
|
||||
* </p>
|
||||
*/
|
||||
public function attach(HookObserverInterface $observer);
|
||||
|
||||
/**
|
||||
* Detach an HookObserver.
|
||||
*
|
||||
* @see http://php.net/manual/en/splsubject.detach.php
|
||||
*
|
||||
* @param \HookObserverInterface| $observer <p>
|
||||
* The <b>HookObserver</b> to detach.
|
||||
* </p>
|
||||
*/
|
||||
public function detach(HookObserverInterface $observer);
|
||||
|
||||
/**
|
||||
* Return the singleton instance of Hook event.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function create();
|
||||
|
||||
/**
|
||||
* Return an array containing all data needed by the hook observer to update.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getEventData();
|
||||
|
||||
/**
|
||||
* Set an array with data needed by hooks.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEventData(array $data);
|
||||
|
||||
/**
|
||||
* Return the event name refer to where hook is used.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEventName();
|
||||
|
||||
/**
|
||||
* Clear all hookObservers without detach them.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function clearAttachments();
|
||||
|
||||
/**
|
||||
* Detach all hook observers.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function detachAll();
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
interface HookManagementInterface
|
||||
{
|
||||
/**
|
||||
* Insert hook into Database. Return insert id.
|
||||
*
|
||||
* @param string $eventName
|
||||
* @param string $observerClassName
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function insertHook($eventName, $observerClassName, $type);
|
||||
|
||||
/**
|
||||
* Delete hook from Database. Return deleted rows number.
|
||||
*
|
||||
* @param string $eventName
|
||||
* @param string $observerClassName
|
||||
* @param int $type
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function deleteHook($eventName, $observerClassName, $type);
|
||||
|
||||
/**
|
||||
* Update hook observer order by hook event.
|
||||
*
|
||||
* @param $eventName
|
||||
* @param $type
|
||||
* @param $newOrder
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function orderHook($eventName, $type, $newOrder);
|
||||
|
||||
/**
|
||||
* Return a list an associative array where keys are the hook observer class name.
|
||||
*
|
||||
* @param $eventName
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function listHookObservers($eventName);
|
||||
|
||||
/**
|
||||
* Check if hooks (event, observer, call) exist in Database, if not,
|
||||
* Will insert them into their respective table.
|
||||
*
|
||||
* @param string $eventName
|
||||
* @param string $observerClassName
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function insertHookIfNotExist($eventName = null, $observerClassName = null);
|
||||
|
||||
/**
|
||||
* Return the hook call id identified by hook event, hook observer and type.
|
||||
*
|
||||
* @param string $eventName
|
||||
* @param string $observerClassName
|
||||
* @param int $type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getHookCallId($eventName, $observerClassName, $type);
|
||||
}
|
||||
31
main/inc/lib/hook/interfaces/base/HookObserverInterface.php
Normal file
31
main/inc/lib/hook/interfaces/base/HookObserverInterface.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
interface HookObserverInterface
|
||||
{
|
||||
/**
|
||||
* Return the singleton instance of Hook observer.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function create();
|
||||
|
||||
/**
|
||||
* Return the path from the class, needed to store location or autoload later.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath();
|
||||
|
||||
/**
|
||||
* Return the plugin name where is the Hook Observer.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPluginName();
|
||||
}
|
||||
29
main/inc/lib/hook/interfaces/base/HookPluginInterface.php
Normal file
29
main/inc/lib/hook/interfaces/base/HookPluginInterface.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* This file contains all Hook interfaces and their relation.
|
||||
* They are used for Hook classes.
|
||||
*
|
||||
* @package chamilo.library.hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface HookPluginInterface
|
||||
* This interface should be implemented by plugins to implements Hook Observer.
|
||||
*/
|
||||
interface HookPluginInterface
|
||||
{
|
||||
/**
|
||||
* This method will call the Hook management insertHook to add Hook observer from this plugin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function installHook();
|
||||
|
||||
/**
|
||||
* This method will call the Hook management deleteHook to disable Hook observer from this plugin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function uninstallHook();
|
||||
}
|
||||
Reference in New Issue
Block a user