PHP code example of backstageel / cakephp-gentelella-theme

1. Go to this page and download the library: Download backstageel/cakephp-gentelella-theme 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/ */

    

backstageel / cakephp-gentelella-theme example snippets


// config/bootstrap.php

Plugin::load('Gentelella', ['bootstrap' => true, 'routes' => true]);

// src/Controller/AppController.php

public function beforeRender(Event $event)
{
    $this->viewBuilder()->theme('Gentelella');
}

// src/Controller/AppController.php
use Cake\Core\Configure;

public function beforeRender(Event $event)
{
    // ...
    $this->set('theme', Configure::read('Theme'));
}

// To customize configuration paste it at end of file config/bootstrap.php

Configure::write('Theme', [
    'title' => 'Gentelella',
    'logo' => [
        'mini' => '<b>G</b>T',
        'large' => '<b>Gentelella</b>Theme'
    ],
    'login' => [
        'show_remember' => true,
        'show_register' => true,
        'show_social' => true
    ]
]);