Pass the widget to addContent() directly

This commit is contained in:
Eric Lippmann 2019-10-30 17:15:27 +01:00
parent cc0d8176c2
commit 3f8ce5f832
4 changed files with 4 additions and 12 deletions

View file

@ -31,12 +31,10 @@ class CommentsController extends Controller
yield $this->export($comments);
$commentList = (new CommentList($comments));
$this->addControl($paginationControl);
$this->addControl($limitControl);
$this->addControl($filterControl);
$this->addContent($commentList);
$this->addContent(new CommentList($comments));
}
}

View file

@ -27,8 +27,6 @@ class NotificationsController extends Controller
$paginationControl = $this->createPaginationControl($notifications);
$filterControl = $this->createFilterControl($notifications);
$notificationList = new NotificationList($notifications);
$this->filter($notifications);
yield $this->export($notifications);
@ -37,6 +35,6 @@ class NotificationsController extends Controller
$this->addControl($limitControl);
$this->addControl($filterControl);
$this->addContent($notificationList);
$this->addContent(new NotificationList($notifications));
}
}

View file

@ -24,12 +24,10 @@ class UsergroupsController extends Controller
yield $this->export($usergroups);
$usergroupList = new UsergroupList($usergroups);
$this->addControl($paginationControl);
$this->addControl($limitControl);
$this->addControl($filterControl);
$this->addContent($usergroupList);
$this->addContent(new UsergroupList($usergroups));
}
}

View file

@ -24,12 +24,10 @@ class UsersController extends Controller
yield $this->export($users);
$userList = new UserList($users);
$this->addControl($paginationControl);
$this->addControl($limitControl);
$this->addControl($filterControl);
$this->addContent($userList);
$this->addContent(new UserList($users));
}
}