PHP code example of nacer / cakephp-adminlte-theme-rtl

1. Go to this page and download the library: Download nacer/cakephp-adminlte-theme-rtl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nacer / cakephp-adminlte-theme-rtl example snippets


// src/Application.php

public function bootstrap()
{
    $this->addPlugin('AdminLTE');
}

// 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');

// 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'
]);

 echo $this->fetch('css'); 

 echo $this->Html->css('AdminLTE./bower_components/morris.js/morris', ['block' => 'css']); 

 echo $this->fetch('script'); 

 echo $this->Html->script('AdminLTE./bower_components/morris.js/morris.min', ['block' => 'script']); 

 echo $this->fetch('scriptBottom'); 

 $this->start('scriptBottom'); 

 echo $this->Flash->render();