25        return array(
"4.4.0", 
"5.0.0");
 
   33        return "http://www.ilias.de/xml/Modules/Portfolio/" . $a_entity;
 
   39    protected function getTypes($a_entity, $a_version)
 
   41        if ($a_entity == 
"prtt") {
 
   48                        "Description" => 
"text",
 
   49                        "Comments" => 
"integer",
 
   51                        "FontColor" => 
"text",
 
   59        if ($a_entity == 
"portfolio_page") {
 
   65                        "PortfolioId" => 
"integer",
 
   67                        "OrderNr" => 
"integer",
 
   80    public function readData($a_entity, $a_version, $a_ids, $a_field = 
"")
 
   84        if (!is_array($a_ids)) {
 
   85            $a_ids = array($a_ids);
 
   88        if ($a_entity == 
"prtt") {
 
   92                        "prtf.comments,prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic" .
 
   93                        " FROM usr_portfolio prtf" .
 
   94                        " JOIN object_data od ON (od.obj_id = prtf.id)" .
 
   95                        " WHERE " . 
$ilDB->in(
"prtf.id", $a_ids, 
false, 
"integer") .
 
   96                        " AND od.type = " . 
$ilDB->quote(
"prtt", 
"text"));
 
  101                        "prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic" .
 
  102                        " FROM usr_portfolio prtf" .
 
  103                        " JOIN object_data od ON (od.obj_id = prtf.id)" .
 
  104                        " WHERE " . 
$ilDB->in(
"prtf.id", $a_ids, 
false, 
"integer") .
 
  105                        " AND od.type = " . 
$ilDB->quote(
"prtt", 
"text"));
 
  110        if ($a_entity == 
"portfolio_page") {
 
  111            switch ($a_version) {
 
  115                        " FROM usr_portfolio_page" .
 
  116                        " WHERE " . 
$ilDB->in(
"portfolio_id", $a_ids, 
false, 
"integer"));
 
  130                    "portfolio_page" => array(
"ids" => $a_rec[
"Id"])
 
  144        if ($a_entity == 
"prtt") {
 
  146            $a_set[
"Dir"] = $dir;
 
  160    public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
  167                if ($new_id = $a_mapping->getMapping(
"Services/Container", 
"objs", $a_rec[
"Id"])) {
 
  174                $newObj->setTitle($a_rec[
"Title"]);
 
  175                $newObj->setDescription($a_rec[
"Description"]);
 
  176                $newObj->setPublicComments($a_rec[
"Comments"]);
 
  177                $newObj->setBackgroundColor($a_rec[
"BgColor"]);
 
  178                $newObj->setFontColor($a_rec[
"FontColor"]);
 
  179                $newObj->setProfilePicture($a_rec[
"Ppic"]);
 
  180                $newObj->setImage($a_rec[
"Img"]);
 
  185                    $dir = str_replace(
"..", 
"", $a_rec[
"Dir"]);
 
  193                $a_mapping->addMapping(
"Modules/Portfolio", 
"prtt", $a_rec[
"Id"], $newObj->getId());
 
  194                $a_mapping->addMapping(
"Services/Object", 
"obj", $a_rec[
"Id"], $newObj->getId());
 
  197            case "portfolio_page":
 
  198                $prtt_id = (int) $a_mapping->getMapping(
"Modules/Portfolio", 
"prtt", $a_rec[
"PortfolioId"]);
 
  201                    $newObj->setPortfolioId($prtt_id);
 
  202                    $newObj->setTitle($a_rec[
"Title"]);
 
  203                    $newObj->setType($a_rec[
"Type"]);
 
  204                    $newObj->setOrderNr($a_rec[
"OrderNr"]);
 
  205                    $newObj->create(
true);
 
  207                    $a_mapping->addMapping(
"Services/COPage", 
"pg", 
"prtt:" . $a_rec[
"Id"], 
"prtt:" . $newObj->getId());
 
An exception for terminatinating execution or to throw for unit testing.
A dataset contains in data in a common structure that can be shared and transformed for different pur...
stripTags(array $rec, array $omit_keys=[])
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
getImportDirectory()
Get import directory.
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type, $a_news_id=0)
Are comments activated for object?
static initStorage($a_id, $a_subdir=null)
Init file system storage.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Portfolio Data set class.
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record.
getSupportedVersions()
Get supported versions.
getTypes($a_entity, $a_version)
Get field types for entity.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
Page for portfolio template.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.