* @param Page $page
*/
public function __construct(
- JointPermission $jointPermission, EntityPermission $entityPermission, Role $role, Connection $db,
- Bookshelf $bookshelf, Book $book, Chapter $chapter, Page $page
- )
- {
+ JointPermission $jointPermission,
+ EntityPermission $entityPermission,
+ Role $role,
+ Connection $db,
+ Bookshelf $bookshelf,
+ Book $book,
+ Chapter $chapter,
+ Page $page
+ ) {
$this->db = $db;
$this->jointPermission = $jointPermission;
$this->entityPermission = $entityPermission;
// Chunk through all bookshelves
$this->bookshelf->newQuery()->select(['id', 'restricted', 'created_by'])
->chunk(50, function ($shelves) use ($roles) {
- $this->buildJointPermissionsForShelves($shelves, $roles);
- });
+ $this->buildJointPermissionsForShelves($shelves, $roles);
+ });
}
/**