Skip to content
Snippets Groups Projects
Commit 9bb6c7dc authored by efalcy's avatar efalcy
Browse files

Arte Vod : ajout d'un module menu

parent 43d6f5bd
Branches
Tags
No related merge requests found
......@@ -2383,6 +2383,7 @@ library/Class/Systeme/ModulesMenu/AbonneModificationFiche.php -text
library/Class/Systeme/ModulesMenu/AbonnePrets.php -text
library/Class/Systeme/ModulesMenu/AbonneReservations.php -text
library/Class/Systeme/ModulesMenu/Accueil.php -text
library/Class/Systeme/ModulesMenu/ArteVod.php -text
library/Class/Systeme/ModulesMenu/Avis.php -text
library/Class/Systeme/ModulesMenu/BibliothequeNumerique.php -text
library/Class/Systeme/ModulesMenu/CVS.php -text
......
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_Systeme_ModulesMenu_ArteVod extends Class_Systeme_ModulesMenu_Null {
use Trait_Translator;
/** @var string */
protected $_type_module = 'ArteVod';
/** @var string */
protected $_libelle = 'Lien vers ArteVod';
public function getArteVodUrlForUser($user) {
if ($user && $user->hasRightAccesArteVod()) {
$arte_link=Class_ArteVodLink::forUser($user);
$url=$arte_link->url();
if (!strlen($url)>0)
$this->setMessage($arte_link->getMessage());
return $url;
}
$this->setMessage($this->_('Votre abonnement ne permet pas d\'accéder aux ressources ArteVod. Merci de contacter la médiathèque'));
return '';
}
public function getUrl($preferences=[]) {
return BASE_URL.'/modules/artevod';
}
public function getDynamiqueUrl($docid=null) {
$user = Class_Users::getIdentity();
if (!$user) {
return '';
}
$url=$this->getArteVodUrlForUser($user);
return $url;
}
public function shouldOpenInNewWindow($preferences) {
return null != Class_Users::getIdentity();
}
public function isVisibleForProfil($profil) {
return Class_AdminVar::isArteVodEnabled();
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment