]> git.mxchange.org Git - friendica.git/blob - src/Module/Special/DisplayNotFound.php
Decouple conversation creation from rendering
[friendica.git] / src / Module / Special / DisplayNotFound.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2023, the Friendica project
4  *
5  * @license GNU AGPL version 3 or any later version
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Affero General Public License for more details.
16  *
17  * You should have received a copy of the GNU Affero General Public License
18  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19  *
20  */
21
22 namespace Friendica\Module\Special;
23
24 use Friendica\Core\Renderer;
25
26 /**
27  * This is a special case of the HTTPException module where the message is intended to be HTML.
28  * This module should be called directly from the Display module and shouldn't be routed to.
29  */
30 class DisplayNotFound extends \Friendica\BaseModule
31 {
32         protected function content(array $request = []): string
33         {
34                 $tpl = Renderer::getMarkupTemplate('special/displaynotfound.tpl');
35                 return Renderer::replaceMacros($tpl, [
36                         '$l10n' => [
37                                 'title'   => $this->t('Not Found'),
38                                 'message' => $this->t("<p>Unfortunately, the requested conversation isn't available to you.</p>
39 <p>Possible reasons include:</p>
40 <ul>
41         <li>The top-level post isn't visible.</li>
42         <li>The top-level post was deleted.</li>
43         <li>The node has blocked the top-level author or the author of the shared post.</li>
44         <li>You have ignored or blocked the top-level author or the author of the shared post.</li>
45 </ul>"),
46                         ]
47                 ]);
48         }
49 }