19 declare(strict_types=1);
43 $rid = $this->irss->createContainer(
47 $this->db->insert(
'export_files_html', [
48 'object_id' => [
'integer', $object_id],
49 'rid' => [
'text', $rid],
51 'type' => [
'text', $type]
61 $this->irss->addStringToContainer(
73 $this->irss->addLocalFileToContainer(
83 string $target_path =
"" 85 $this->irss->addDirectoryToContainer(
93 string $source_container_id,
94 string $target_container_id,
95 string $source_dir_path =
"",
96 string $target_dir_path =
"" 98 $this->irss->addContainerDirToTargetContainer(
100 $target_container_id,
108 $this->db->update(
'export_files_html', [
110 'type' => [
'text', $file->
getType()]
113 'rid' => [
'text', $file->
getRid()]
117 public function delete(
121 $this->irss->deleteResource(
125 $this->db->manipulateF(
126 'DELETE FROM export_files_html WHERE object_id = %s AND rid = %s',
135 return $this->irss->getResourcePath($rid);
140 $set = $this->db->queryF(
141 'SELECT * FROM export_files_html WHERE object_id = %s AND rid = %s',
146 $record = $this->db->fetchAssoc($set);
155 $set = $this->db->queryF(
156 "SELECT * FROM export_files_html " .
157 " WHERE object_id = %s ORDER BY timestamp DESC",
161 while ($record = $this->db->fetchAssoc($set)) {
168 return $this->irss->getResourceIdForIdString($rid);
173 return $this->data->exportFile(
174 (
int) $record[
'object_id'],
175 (
string) $record[
'rid'],
176 (
string) $record[
'timestamp'],
177 (
string) $record[
'type']
183 $this->irss->deliverFile($rid);
191 $this->irss->renameContainer($rid, $title);
addString(string $rid, string $content, string $path,)
getExportFileFromRecord(array $record)
addFile(string $rid, string $fullpath, string $path,)
static now()
Return current timestamp in Y-m-d H:i:s format.
getById(int $object_id, string $rid)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getResourceIdForIdString(string $rid)
addDirectory(string $rid, string $source_dir, string $target_path="")
create(int $object_id, string $type, string $title)
Class ResourceIdentification.
getAllOfObjectId(int $object_id)
addContainerDirToTargetContainer(string $source_container_id, string $target_container_id, string $source_dir_path="", string $target_dir_path="")
rename(string $rid, string $title)
__construct(protected ilDBInterface $db, protected IRSSWrapper $irss, protected DataService $data, protected \ilExportHTMLStakeholder $stakeholder)