id; } public function isAvailable(): bool { return true; } public function getTitle(): string { return $this->title; } public function getDocumentId(): string { return $this->isFolder() ? str_replace('_', ' ', basename($this->path)) : $this->documentId; } public function isTargetBlank(): bool { return $this->isFile(); } public function getSubtitle(): ?string { return null; } public function getUrl(): string { global $config; return $this->isFolder() ? "/files/wff/{$this->id}/" : "https://{$config['files_domain']}/NSA Friedman Documents/{$this->path}"; } public function getMeta(?string $hl_matched = null): array { if ($this->isFolder()) { if (!$this->parentId) return []; return [ 'items' => [ highlightSubstring($this->getDocumentId(), $hl_matched), langNum('files_count', $this->filesCount) ] ]; } return [ 'inline' => false, 'items' => [ highlightSubstring('Document '.$this->documentId), sizeString($this->size), 'PDF' ] ]; } }