19declare(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);
147 return $record ? $this->getExportFileFromRecord($record) :
null;
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)) {
162 yield $this->getExportFileFromRecord($record);
168 $set = $this->db->queryF(
169 "SELECT * FROM export_files_html " .
170 " WHERE object_id = %s AND type = %s ORDER BY timestamp DESC",
174 if ($record = $this->db->fetchAssoc($set)) {
175 return $this->getExportFileFromRecord($record);
182 return $this->irss->getResourceIdForIdString($rid);
187 return $this->data->exportFile(
188 (
int) $record[
'object_id'],
189 (
string) $record[
'rid'],
190 (
string) $record[
'timestamp'],
191 (
string) $record[
'type']
197 $this->irss->deliverFile($rid);
205 $this->irss->renameContainer($rid, $title);
getExportFileFromRecord(array $record)
addContainerDirToTargetContainer(string $source_container_id, string $target_container_id, string $source_dir_path="", string $target_dir_path="")
getLatestOfObjectIdAndType(int $object_id, string $type="")
addString(string $rid, string $content, string $path,)
__construct(protected ilDBInterface $db, protected IRSSWrapper $irss, protected DataService $data, protected \ilExportHTMLStakeholder $stakeholder)
getAllOfObjectId(int $object_id)
addDirectory(string $rid, string $source_dir, string $target_path="")
create(int $object_id, string $type, string $title)
addFile(string $rid, string $fullpath, string $path,)
rename(string $rid, string $title)
getById(int $object_id, string $rid)
getResourceIdForIdString(string $rid)
Class ResourceIdentification.
static now()
Return current timestamp in Y-m-d H:i:s format.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...