[PLUGIN][Directory] Rename actor to people, as it's what's actually interacted with
This commit is contained in:
parent
1f01923aa1
commit
fc76a00908
@ -31,14 +31,14 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
class Directory extends FeedController
|
class Directory extends FeedController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* actors stream
|
* people stream
|
||||||
*
|
*
|
||||||
* @return array template
|
* @return array template
|
||||||
*/
|
*/
|
||||||
public function actors(Request $request): array
|
public function people(Request $request): array
|
||||||
{
|
{
|
||||||
return [
|
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']),
|
'actors' => DB::findBy(Actor::class, ['type' => Actor::PERSON], order_by: ['created' => 'DESC', 'nickname' => 'ASC']),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class Directory extends Plugin
|
|||||||
*/
|
*/
|
||||||
public function onAddRoute(RouteLoader $r)
|
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']);
|
$r->connect('directory_groups', '/directory/groups', [Controller\Directory::class, 'groups']);
|
||||||
|
|
||||||
return Event::next;
|
return Event::next;
|
||||||
@ -50,8 +50,8 @@ class Directory extends Plugin
|
|||||||
*/
|
*/
|
||||||
public function onAddMainNavigationItem(array $vars, array &$res): bool
|
public function onAddMainNavigationItem(array $vars, array &$res): bool
|
||||||
{
|
{
|
||||||
$res[] = ['title' => 'Actors', 'path' => Router::url('directory_actors', []), 'path_id' => 'directory_actors'];
|
$res[] = ['title' => 'People', 'path' => Router::url($path_id = 'directory_people', []), 'path_id' => $path_id];
|
||||||
$res[] = ['title' => 'Groups', 'path' => Router::url('directory_groups', []), 'path_id' => 'directory_groups'];
|
$res[] = ['title' => 'Groups', 'path' => Router::url($path_id = 'directory_groups', []), 'path_id' => $path_id];
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user