[PLUGIN][Directory] Rename actor to people, as it's what's actually interacted with

This commit is contained in:
Hugo Sales 2022-01-01 20:02:32 +00:00
parent 1f01923aa1
commit fc76a00908
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
3 changed files with 6 additions and 6 deletions

View File

@ -31,14 +31,14 @@ use Symfony\Component\HttpFoundation\Request;
class Directory extends FeedController
{
/**
* actors stream
* people stream
*
* @return array template
*/
public function actors(Request $request): array
public function people(Request $request): array
{
return [
'_template' => 'directory/actors.html.twig',
'_template' => 'directory/people.html.twig',
'actors' => DB::findBy(Actor::class, ['type' => Actor::PERSON], order_by: ['created' => 'DESC', 'nickname' => 'ASC']),
];
}

View File

@ -35,7 +35,7 @@ class Directory extends Plugin
*/
public function onAddRoute(RouteLoader $r)
{
$r->connect('directory_actors', '/directory/actors', [Controller\Directory::class, 'actors']);
$r->connect('directory_people', '/directory/people', [Controller\Directory::class, 'people']);
$r->connect('directory_groups', '/directory/groups', [Controller\Directory::class, 'groups']);
return Event::next;
@ -50,8 +50,8 @@ class Directory extends Plugin
*/
public function onAddMainNavigationItem(array $vars, array &$res): bool
{
$res[] = ['title' => 'Actors', 'path' => Router::url('directory_actors', []), 'path_id' => 'directory_actors'];
$res[] = ['title' => 'Groups', 'path' => Router::url('directory_groups', []), 'path_id' => 'directory_groups'];
$res[] = ['title' => 'People', 'path' => Router::url($path_id = 'directory_people', []), 'path_id' => $path_id];
$res[] = ['title' => 'Groups', 'path' => Router::url($path_id = 'directory_groups', []), 'path_id' => $path_id];
return Event::next;
}
}