This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
accm-website/includes/users/userRights/MemberRightFormatter.inc.php
2010-08-14 22:32:09 +02:00

36 lines
880 B
PHP

<?php
include_once 'includes/users/userRights/MemberRight.inc.php';
/**
* This class allows for an easy formatting of users rights.
*
* @author Thomas Schwery <thomas.schwery@epfl.ch>
*/
class MemberRightFormatter {
/**
* Maps rights to a string describing in a human format the rights.
*
* @param Right $right
* @return string
*/
public static function format(MemberRight $right) {
return $right->getName();
}
public static function getSummaryBox(MemberRight $right) {
$name = $right->getName();
$id = $right->getIdentifier();
$content = "<div style='border: 1px dotted black;'>";
$content.= Localization::memberRightName . ": $name";
$content.= "<br>\n";
$content.= Localization::memberRightId . ": $id";
$content.= "</div>";
return $content;
}
}
?>