3 declare(strict_types=1);
    17     public function __construct(
string $type, 
string $id, 
string $description, array $op_ids = [])
    27         return hash(
"sha256", self::class);
    32         $op_ids = implode(
",", $this->op_ids);
    33         return "Add rbac template (type=$this->type;id=$this->id;description=$this->description;op_ids=$op_ids)";
    50         $db = $environment->
getResource(Environment::RESOURCE_DATABASE);
    52         $tpl_id = $db->nextId(
"object_data");
    54             "obj_id" => [
"integer", $tpl_id],
    55             "type" => [
"text", 
"rolt"],
    58             "owner" => [
"integer", -1],
    59             "create_date" => [
"timestamp", date(
"Y-m-d H:i:s")],
    60             "last_update" => [
"timestamp", date(
"Y-m-d H:i:s")]
    62         $db->insert(
"object_data", $values);
    65             "rol_id" => [
"integer", $tpl_id],
    66             "parent" => [
"integer", 8],
    67             "assign" => [
"text", 
"n"],
    68             "protected" => [
"text", 
"n"]
    70         $db->insert(
"rbac_fa", $values);
    72         foreach ($this->op_ids as $op_id) {
    74                 "rol_id" => [
"integer", $tpl_id],
    76                 "ops_id" => [
"integer", $op_id],
    77                 "parent" => [
"integer", 8]
    79             $db->insert(
"rbac_templates", $values);
    87         return (
bool) count($this->op_ids);
 
__construct(string $type, string $id, string $description, array $op_ids=[])
 
isApplicable(Environment $environment)
 
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
An environment holds resources to be used in the setup process. 
 
achieve(Environment $environment)
 
getPreconditions(Environment $environment)