. // }}} /** * @author Hugo Sales * @copyright 2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace Component\Conversation\Controller; use App\Core\DB\DB; use function App\Core\I18n\_m; use Component\Feed\Util\FeedController; use Symfony\Component\HttpFoundation\Request; class Conversation extends FeedController { /** * Render conversation page * * @return array */ public function showConversation(Request $request, int $conversation_id) { // TODO: // if note is root -> just link // if note is a reply -> link from above plus anchor $notes = DB::dql('select n from App\Entity\Note n ' . 'on n.conversation_id = :id ' . 'order by n.created DESC', ['id' => $conversation_id], ); return [ '_template' => 'feed/feed.html.twig', 'notes' => $notes, 'should_format' => false, 'page_title' => _m('Conversation'), ]; } }