لتحميل عميل الملحن: composer.
أمر التحميل
composer require nacer/cakephp-adminlte-rtl
النص الأصلي لكيفية التثبيت في المكتبة البرمجية CAKEPHP 3
// src/Application.php
public function bootstrap()
{
$this->addPlugin('AdminLTE');
}
Before of CakePHP 3.7
// config/bootstrap.php
Plugin::load('AdminLTE', ['bootstrap' => true, 'routes' => true]);
// src/Controller/AppController.php
public function beforeRender(Event $event)
{
$this->viewBuilder()->setTheme('AdminLTE');
// Before of CakePHP 3.5
$this->viewBuilder()->theme('AdminLTE');
}
// src/View/AppView.php
public function initialize()
{
$this->loadHelper('Form', ['className' => 'AdminLTE.Form']);
}
// new config/adminlte.php file
return [
'Theme' => [
'title' => 'AdminLTE',
'logo' => [
'mini' => '<b>A</b>LT',
'large' => '<b>Admin</b>LTE'
],
'login' => [
'show_remember' => true,
'show_register' => true,
'show_social' => true
],
'folder' => ROOT,
'skin' => 'blue'
]
];
// config/bootstrap.php
Configure::load('adminlte', 'default');
Before of CakePHP 3.7
// config/bootstrap.php
Configure::write('Theme', [
'title' => 'AdminLTE',
'logo' => [
'mini' => '<b>A</b>LT',
'large' => '<b>Admin</b>LTE'
],
'login' => [
'show_remember' => true,
'show_register' => true,
'show_social' => true
],
'folder' => ROOT,
'skin' => 'blue' // default is 'blue'
]);
If you want to Customize Layout
There are 10 layout files.
- boxed
- collapsed
- default it's the main layout
- documentation
- fixed
- lockscreen
- login
- register
- top
There are 3 Blocks where you can extend your theme.
- css
<?php echo $this->fetch('css'); ?>
One example is src/Template/Pages/home.ctp
:
<?php echo $this->Html->css('AdminLTE./bower_components/morris.js/morris', ['block' => 'css']); ?>
- script
<?php echo $this->fetch('script'); ?>
One example is src/Template/Pages/home.ctp
:
<?php echo $this->Html->script('AdminLTE./bower_components/morris.js/morris.min', ['block' => 'script']); ?>
- scriptBottom
<?php echo $this->fetch('scriptBottom'); ?>
One example is src/Template/Pages/home.ctp
:
<?php $this->start('scriptBottom'); ?>
<script>
$.widget.bridge('uibutton', $.ui.button);
</script>
<?php $this->end(); ?>
There are 7 element files.
- Element/
- aside/
- form
- sidebar-menu
- user-panel
- aside-control-sidebar
- aside-main-sidebar
- footer
- nav-top
- aside/
The theme is prepared to show Flash Messages.
<?php echo $this->Flash->render(); ?>
<?php echo $this->Flash->render('auth'); ?>
One of the better Cake features. The theme is prepared to use Bake.
bin/cake bake all user --theme AdminLTE
- AdminLTEView
This is one the better theme feature. It change the pattern how Cake show view files.
Basically, you overwrite any theme, plugin and prefix files.
- src/Template/Plugin/$theme/Plugin/$plugin/$prefix/
- src/Template/Plugin/$theme/Plugin/$plugin/
- src/Template/Plugin/$theme/$prefix/
- src/Template/Plugin/$theme/
FormHelper by default has format template based on Foundation template. This helper overwrite these templates.
- DatepickerBehavior
When you configure App.defaultLocale
to pt_BR
this Behavior is util.
When you configure App.defaultLocale
to pt_BR
this Locale is util.
Added link to default page of CakePHP.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request