Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions formwork/src/Admin/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public function index(): Response

$this->modal('newPage', [
'templates' => $this->site()->templates(),
'pages' => $this->site()->descendants()->sort('path')
'pages' => $this->site()->descendants()->sortBy('path')
]);

$this->modal('deletePage');

return new Response($this->view('dashboard.index', [
'title' => $this->admin()->translate('admin.dashboard.dashboard'),
'lastModifiedPages' => $this->view('pages.list', [
'pages' => $this->site()->descendants()->sort('lastModifiedTime', SORT_DESC)->slice(0, 5),
'pages' => $this->site()->descendants()->sortBy('lastModifiedTime', direction: SORT_DESC)->slice(0, 5),
'subpages' => false,
'class' => 'pages-list-top',
'parent' => null,
Expand Down
4 changes: 2 additions & 2 deletions formwork/src/Admin/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function index(): Response

$this->modal('newPage', [
'templates' => $this->site()->templates(),
'pages' => $this->site()->descendants()->sort('path')
'pages' => $this->site()->descendants()->sortBy('path')
]);

$this->modal('deletePage');
Expand Down Expand Up @@ -190,7 +190,7 @@ public function edit(RouteParams $params): Response
'page' => $page,
'fields' => $fields,
'templates' => $this->site()->templates(),
'parents' => $this->site()->descendants()->sort('path'),
'parents' => $this->site()->descendants()->sortBy('path'),
'currentLanguage' => $params->get('language', $page->language()),
'availableLanguages' => $this->availableSiteLanguages()
], true));
Expand Down
8 changes: 6 additions & 2 deletions formwork/src/Admin/Users/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

namespace Formwork\Admin\Users;

use Formwork\Data\AssociativeCollection;
use Formwork\Data\AbstractCollection;
use Formwork\Formwork;
use Formwork\Parsers\YAML;
use Formwork\Utils\FileSystem;

class Users extends AssociativeCollection
class Users extends AbstractCollection
{
protected bool $associative = true;

protected ?string $dataType = User::class;

/**
* All available roles
*/
Expand Down
Loading