33     protected \ILIAS\Notes\Service 
$notes;
    40         $this->notes = $DIC->notes();
    46         return array(
"4.4.0", 
"5.0.0", 
"10.0");
    49     protected function getXmlNamespace(
string $a_entity, 
string $a_schema_version): string
    51         return "https://www.ilias.de/xml/Modules/Portfolio/" . $a_entity;
    54     protected function getTypes(
string $a_entity, 
string $a_version): array
    56         if ($a_entity === 
"prtt") {
    63                         "Description" => 
"text",
    64                         "Comments" => 
"integer",
    66                         "FontColor" => 
"text",
    75                         "Description" => 
"text",
    76                         "Comments" => 
"integer",
    78                         "FontColor" => 
"text",
    84         if ($a_entity === 
"portfolio_page") {
    91                         "PortfolioId" => 
"integer",
    93                         "OrderNr" => 
"integer",
   101     public function readData(
string $a_entity, 
string $a_version, array $a_ids): void
   105         if (!is_array($a_ids)) {
   106             $a_ids = array($a_ids);
   109         if ($a_entity === 
"prtt") {
   110             switch ($a_version) {
   113                         "prtf.comments,prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic" .
   114                         " FROM usr_portfolio prtf" .
   115                         " JOIN object_data od ON (od.obj_id = prtf.id)" .
   116                         " WHERE " . 
$ilDB->in(
"prtf.id", $a_ids, 
false, 
"integer") .
   117                         " AND od.type = " . 
$ilDB->quote(
"prtt", 
"text"));
   123                         "prtf.bg_color,prtf.font_color,prtf.ppic" .
   124                         " FROM usr_portfolio prtf" .
   125                         " JOIN object_data od ON (od.obj_id = prtf.id)" .
   126                         " WHERE " . 
$ilDB->in(
"prtf.id", $a_ids, 
false, 
"integer") .
   127                         " AND od.type = " . 
$ilDB->quote(
"prtt", 
"text"));
   132         if ($a_entity === 
"portfolio_page") {
   133             switch ($a_version) {
   138                         " FROM usr_portfolio_page" .
   139                         " WHERE " . 
$ilDB->in(
"portfolio_id", $a_ids, 
false, 
"integer"));
   148         ?array $a_rec = null,
   151         if ($a_entity === 
"prtt") {
   153                 "portfolio_page" => array(
"ids" => $a_rec[
"Id"] ?? null)
   164         if ($a_entity === 
"prtt") {
   165             $a_set[
"Comments"] = $this->notes->domain()->commentsActive((
int) $a_set[
"Id"]);
   177         string $a_schema_version
   184                 if ($new_id = $a_mapping->
getMapping(
"components/ILIAS/Container", 
"objs", $a_rec[
"Id"])) {
   191                 $newObj->setTitle($a_rec[
"Title"]);
   192                 $newObj->setDescription($a_rec[
"Description"]);
   193                 $newObj->setPublicComments($a_rec[
"Comments"]);
   194                 $newObj->setBackgroundColor($a_rec[
"BgColor"]);
   195                 $newObj->setFontColor($a_rec[
"FontColor"]);
   196                 $newObj->setProfilePicture($a_rec[
"Ppic"]);
   199                 $a_mapping->
addMapping(
"components/ILIAS/Portfolio", 
"prtt", $a_rec[
"Id"], $newObj->getId());
   200                 $a_mapping->
addMapping(
"components/ILIAS/ILIASObject", 
"obj", $a_rec[
"Id"], $newObj->getId());
   203             case "portfolio_page":
   204                 $prtt_id = (
int) $a_mapping->
getMapping(
"components/ILIAS/Portfolio", 
"prtt", $a_rec[
"PortfolioId"]);
   210                     $newObj->setPortfolioId($prtt_id);
   211                     $newObj->setTitle($a_rec[
"Title"]);
   212                     $newObj->setType($a_rec[
"Type"]);
   213                     $newObj->setOrderNr($a_rec[
"OrderNr"]);
   214                     $newObj->create(
true);
   216                     $a_mapping->
addMapping(
"components/ILIAS/COPage", 
"pg", 
"prtt:" . $a_rec[
"Id"], 
"prtt:" . $newObj->getId());
 ilObjPortfolio $current_portfolio
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getTypes(string $a_entity, string $a_version)
 
getXmlRecord(string $a_entity, string $a_version, array $a_set)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getDependencies(string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
 
getXmlNamespace(string $a_entity, string $a_schema_version)
 
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 
getMapping(string $a_comp, string $a_entity, string $a_old_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ILIAS Notes Service $notes
 
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
__construct(Container $dic, ilPlugin $plugin)
 
stripTags(array $rec, array $omit_keys=[])
 
readData(string $a_entity, string $a_version, array $a_ids)