- parent::prepare($argarray);
-
- $this->id = $this->trimmed('id');
-
- if (empty($this->id)) {
- // TRANS: Client exception thrown when no ID parameter was provided.
- throw new ClientException(_('No id parameter.'));
- }
-
- $this->file = File::staticGet('id', $this->id);
-
- if (empty($this->file)) {
- // TRANS: Client exception thrown when an invalid ID parameter was provided for a file.
- // TRANS: %d is the provided ID for which the file is not present (number).
- throw new ClientException(sprintf(_('No such file "%d".'),
- $this->id),
- 404);
- }