28 self::TABLE_MOUNT_INSTRUCTIONS,
32 'id' => array(
'int', $document->
getId()),
33 'title' => array(
'text', $document->
getTitle()),
37 'creation_ts' => array(
'timestamp', $document->
getCreationTs()),
41 'sorting' => array(
'int', $document->
getSorting())
51 if (!$this->db->sequenceExists(self::TABLE_MOUNT_INSTRUCTIONS)) {
52 $this->db->createSequence(self::TABLE_MOUNT_INSTRUCTIONS);
55 return $this->db->nextId(self::TABLE_MOUNT_INSTRUCTIONS);
63 $query =
"SELECT max(sorting) as max_sort FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS);
66 $row = $this->db->fetchAssoc(
$result);
67 return isset($row) && !is_null($row[
'max_sort']) ? $row[
'max_sort'] : 0;
75 $query =
"SELECT * FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS)
76 .
" WHERE id=" . $this->db->quote($id,
'int');
79 $record = $this->db->fetchAssoc(
$result);
82 throw new InvalidArgumentException(
"Document with the id $id not found");
93 $query =
"SELECT * FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS)
94 .
" WHERE lng=" . $this->db->quote($language,
'text');
97 $record = $this->db->fetchAssoc(
$result);
100 throw new InvalidArgumentException(
"Document for the language $language not found");
111 $query =
"SELECT * FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS) .
" ORDER BY sorting";
114 $document_list = array();
115 while ($record = $this->db->fetchAssoc(
$result)) {
119 return $document_list;
127 $query =
"SELECT * FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS)
128 .
" WHERE lng=" . $this->db->quote($language,
'text');
131 $record = $this->db->fetchAssoc(
$result);
133 return ($record ==
null ? 0 : $record[
'id']);
143 self::TABLE_MOUNT_INSTRUCTIONS,
147 'title' => array(
'text', $document->
getTitle()),
149 'creation_ts' => array(
'timestamp', $document->
getCreationTs()),
153 'sorting' => array(
'int', $document->
getSorting())
158 'id' => array(
'int', $document->
getId()),
170 self::TABLE_MOUNT_INSTRUCTIONS,
174 'sorting' => array(
'int', $a_new_sorting_value)
179 'id' => array(
'int', $id),
189 $query =
"DELETE FROM " . $this->db->quoteIdentifier(self::TABLE_MOUNT_INSTRUCTIONS)
190 .
' WHERE id=' . $this->db->quote($id,
'integer');
192 $this->db->manipulate(
$query);
206 $result[
'uploaded_instructions'],
207 $result[
'processed_instructions'],
212 $result[
'last_modification_usr_id'],
An exception for terminatinating execution or to throw for unit testing.
getProcessedInstructions()
getUploadedInstructions()
getLastModificationUsrId()
const TABLE_MOUNT_INSTRUCTIONS
__construct(ilDBInterface $a_db)
ilWebDAVMountInstructionsRepository constructor.
createMountInstructionsDocumentEntry(ilWebDAVMountInstructionsDocument $document)
@inheritDoc
getNextMountInstructionsDocumentId()
@inheritDoc
deleteMountInstructionsById(int $id)
@inheritDoc
buildDocumentFromDatabaseRecord(array $result)
Fills document with results array from database.
getMountInstructionsByLanguage(string $language)
@inheritDoc
updateMountInstructions(ilWebDAVMountInstructionsDocument $document)
@inheritDoc
getMountInstructionsDocumentById(int $id)
@inheritDoc
doMountInstructionsExistByLanguage(string $language)
@inheritDoc
getHighestSortingNumber()
@inheritDoc
updateSortingValueById(int $id, int $a_new_sorting_value)
@inheritDoc
getAllMountInstructions()
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilWebDAVMountInstructionsRepository.