[PLUGINS][RelatedTags] Add related tags plugin and needed infrastructure. Initial work on pinned content
This commit is contained in:
@@ -22,6 +22,7 @@ declare(strict_types = 1);
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Core\Entity;
|
||||
use App\Core\Router\Router;
|
||||
use Component\Tag\Tag;
|
||||
use DateTimeInterface;
|
||||
|
||||
@@ -95,6 +96,15 @@ class NoteTag extends Entity
|
||||
// @codeCoverageIgnoreEnd
|
||||
// }}} Autocode
|
||||
|
||||
public function getUrl(?Actor $actor = null): string
|
||||
{
|
||||
$params = ['tag' => $this->getCanonical()];
|
||||
if (!\is_null($actor)) {
|
||||
$params['lang'] = $actor->getTopLanguage()->getLocale();
|
||||
}
|
||||
return Router::url('single_note_tag', $params);
|
||||
}
|
||||
|
||||
public static function schemaDef(): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user