18declare(strict_types=1);
 
   36        $this->db = 
$DIC->database();
 
   44        if (!isset(self::$instance)) {
 
   55        $query = 
'SELECT * FROM ecs_export ' .
 
   56            'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer');
 
   70        $econtent_ids = array();
 
   71        $query = 
"SELECT econtent_id,obj_id FROM ecs_export " .
 
   72            'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
 
   76            $econtent_ids[$row->econtent_id] = $row->obj_id;
 
   86        $query = 
"SELECT obj_id FROM ecs_export ";
 
   90            $obj_ids[] = (
int) $row->obj_id;
 
  101        $query = 
"SELECT e.obj_id FROM ecs_export e" .
 
  102            " JOIN object_data o ON (e.obj_id = o.obj_id)" .
 
  103            " WHERE o.type = " . $this->db->quote($a_type, 
"text");
 
  106            $obj_ids[] = (
int) $row->obj_id;
 
  116        $query = 
'SELECT * FROM ecs_export ' .
 
  117            'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer');
 
  122            $sids[] = (
int) $row->server_id;
 
  132        $query = 
"SELECT obj_id FROM ecs_export " .
 
  133            'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
 
  137            $obj_ids[] = $row->obj_id;
 
  147        $query = 
'SELECT * FROM ecs_export ' .
 
  148            'WHERE obj_id = ' . $this->db->quote($a_obj_id, 
'integer') . 
' ';
 
  152            $sids[] = (
int) $row->server_id;
 
  165        if (!is_array($a_ids) || !count($a_ids)) {
 
  168        $query = 
"DELETE FROM ecs_export WHERE " . $this->db->in(
'econtent_id', $a_ids, 
false, 
'integer') . 
' ' .
 
  169            'AND server_id = ' . $this->db->quote($a_server_id, 
'integer');
 
  170        $this->db->manipulate(
$query);
 
  179        $query = 
'DELETE FROM ecs_export ' .
 
  180            'WHERE server_id = ' . $this->db->quote($a_server_id, 
'integer');
 
  181        $this->db->manipulate(
$query);
 
  187    public function _isRemote(
int $a_server_id, 
int $a_econtent_id): bool
 
  189        $query = 
"SELECT obj_id FROM ecs_export " .
 
  190            "WHERE econtent_id = " . $this->db->quote($a_econtent_id, 
'integer') . 
" " .
 
  191            'AND server_id = ' . $this->db->quote($a_server_id, 
'integer');
 
Manage the ECS exported contents.
 
getExportedIds()
Get exported ids.
 
static ilECSExportManager $instance
 
getExportedIdsByType(string $a_type)
Get exported ids by type.
 
_isExported(int $a_obj_id)
Check if object is exported.
 
static getInstance()
Get the singelton instance of this ilECSExportManager.
 
_getAllEContentIds(int $a_server_id)
get all exported econtent ids per server
 
lookupServerIds(int $a_obj_id)
Lookup server ids of exported objects.
 
_getExportedIDsByServer(int $a_server_id)
get exported ids for server
 
_isRemote(int $a_server_id, int $a_econtent_id)
is remote object
 
_deleteEContentIds(int $a_server_id, array $a_ids)
Delete econtent ids for server.
 
getExportServerIds(int $a_obj_id)
lookup server ids of exported materials
 
deleteByServer(int $a_server_id)
Delete by server id.