Skip to content

Commit 5604250

Browse files
committed
Installation step-by-step
1 parent 53df48d commit 5604250

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

config/bootstrap.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@
191191
*/
192192

193193
Plugin::load('Migrations');
194+
Plugin::load('AdminLTE', ['bootstrap' => true, 'routes' => true]);
195+
194196

195197
// Only try to load DebugKit in development mode
196198
// Debug Kit should not be installed on a production system
@@ -219,3 +221,16 @@
219221
->useImmutable();
220222
Type::build('datetime')
221223
->useImmutable();
224+
225+
Configure::write('Theme', [
226+
'title' => 'Maicon Pinto',
227+
'logo' => [
228+
'mini' => '<b>M</b>P',
229+
'large' => '<b>Maicon</b>PINTO'
230+
],
231+
'login' => [
232+
'show_remember' => false,
233+
'show_register' => false,
234+
'show_social' => false
235+
]
236+
]);

src/Controller/AppController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
use Cake\Controller\Controller;
1818
use Cake\Event\Event;
19+
use Cake\Core\Configure;
1920

2021
/**
2122
* Application Controller
@@ -58,5 +59,9 @@ public function beforeRender(Event $event)
5859
) {
5960
$this->set('_serialize', true);
6061
}
62+
63+
$this->viewBuilder()->theme('AdminLTE');
64+
65+
$this->set('theme', Configure::read('Theme'));
6166
}
6267
}

src/View/AppView.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ class AppView extends View
3636
*/
3737
public function initialize()
3838
{
39+
$this->loadHelper('Form', ['className' => 'AdminLTE.Form']);
3940
}
4041
}

0 commit comments

Comments
 (0)