fix search provider names/ids, set results thumbnail urls, use them in ref provider

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
Julien Veyssier
2023-02-01 00:20:12 +01:00
parent 5830dbd467
commit 264be93a74
7 changed files with 39 additions and 21 deletions

View File

@@ -26,6 +26,7 @@ declare(strict_types=1);
namespace OCA\Deck\Search;
use OCA\Deck\AppInfo\Application;
use OCA\Deck\Db\Board;
use OCA\Deck\Db\Card;
use OCA\Deck\Db\Stack;
@@ -33,6 +34,14 @@ use OCP\Search\SearchResultEntry;
class CardSearchResultEntry extends SearchResultEntry {
public function __construct(Board $board, Stack $stack, Card $card, $urlGenerator) {
parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle(), $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck');
parent::__construct(
$urlGenerator->getAbsoluteURL(
$urlGenerator->imagePath(Application::APP_ID, 'card.svg')
),
$card->getTitle(),
$board->getTitle() . ' » ' . $stack->getTitle(),
$urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(),
'icon-deck'
);
}
}