1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-29 16:00:15 +02:00

Flextype Box Plugin: Admin #125 #117

- Entries Controller/Views implementation
This commit is contained in:
Awilum
2019-05-31 17:13:06 +03:00
parent 64757559b4
commit 205f1759c9

View File

@@ -24,11 +24,24 @@ class EntriesController extends Controller
public function index($request, $response, $args)
{
$id = $request->getQueryParams()['id'];
if ($id == null) {
$id = [0 => ''];
} else {
$id = explode("/", $request->getQueryParams()['id']);
}
var_dump($id);
return $this->view->render($response,
'plugins/admin/views/templates/content/entries/index.html', [
'entries_list' => $this->entries->fetchAll($this->getEntriesQuery($request->getQueryParams()['entry']), 'date', 'DESC'),
'entry_current' => $this->getEntriesQuery($request->getQueryParams()['entry']),
'entries_list' => $this->entries->fetchAll($this->getEntriesQuery($request->getQueryParams()['id']), 'date', 'DESC'),
'entry_current' => $this->getEntriesQuery($request->getQueryParams()['id']),
'menu_item' => 'entries',
'parts' => $id,
'i' => count($id),
'last' => Arr::last($id),
'links' => [
'entries' => [
'link' => $this->router->urlFor('admin.entries.index'),