Plugin with access control and other good resources for CakePHP 3
 
Em Português

Motivation

The motivation of this plugin was to create a model application with CakePHP 3 that had already built all the best features I want to use the applications to be created by me. Imagining that will be useful to someone else the compartilahei here.

This plugin is hosted in repositories:

Github - https://github.com/ribafs/cake-control

Packagist - https://packagist.org/packages/ribafs/cake-control

This plugin includes lessjs plugins and less.php parsers and allows you to easily create applications with CakePHP 3 (Twitter) Bootstrap and TWBs-cake-plugin

Some Features

    
internationalization
    
Element topmenu
    
TinyMCE editor
    
Search by several fields and with pagination
    
Cripografia passwords with Bcrypt
    
access control with the Control component
    
parsers less
    
LessHelper
    
Template Bake
    
Layout default with Bootstrap
    
Utilities BootstrapUI plugin
    
etc

Installation

Create a new application with cakephp 3 using the composer:
composer create-project --prefer-dist cakephp/app control1
To install the latest version of the cake-control plugin, run:
 
cd control1
composer require ribafs / cake-control: must-master


To install the stable version of cake-control plugin, run:

cd control1
composer require ribafs / cake-control


Enable plugin
run

bin / cake plugin load CakeControl --bootstrap
or
Add the plugin to config / bootstrap.php script:
Plugin :: load ( 'CakeControl' [ 'bootstrap' => true]);
This will load the Less and BootstrapUI plugins
Configuration TWBs-cake-plugin plugin

// Add to the start of src / AppController.php

public $ helpers = [
    
'Less.Less', // required is less parsing files
    
'BootstrapUI.Form'
    
'BootstrapUI.Html'
    
'BootstrapUI.Flash'
    
'BootstrapUI.Paginator'
];

layout

Add to initialize () of src/AppController.php:
$this->viewBuilder()->layout( 'CakeControl.default');

If you prefer to use CSS instead of Less need: BootstrapUI layouts.
Create and configure database.

So to test, use the existing script in the docs folder:
https://github.com/ribafs/cake-control/blob/master/docs/cake-contrl-pg.sql
https://github.com/ribafs/cake-control/blob/master/docs/cake-control-my.sql

Create the database, import the above script and set in config/app.php.

Also configure the config/routes.php to Permissions controller and action index ().
 
Generating code with Bake

bin/cake bake all Groups --theme CakeControl
bin/cake bake all Users --theme CakeControl
bin/cake bake all Permissions --theme CakeControl
bin/cake bake all servers --theme CakeControl

Implementing access control and other features

See the docs directory other resources.

Here's how to implement more features

http://ribafs.org/portal/cakephp/plugins/extra-resources

Todo

-
Automating the installation of the Control component and AppController, among other features directly into the Plugin Bake template.

-
Create a plug-in English, or better yet, create a single PlugIM to speak both languages automatically or easily.

You can also generate your views using BootstrapUI's bake templates. See the readme for details.
Utilities

This plugin "includes" The Following utilities (all they come from other plugins):

    
less LessHelper
    
BootstrapUI FormHelper
    
BootstrapUI HtmlHelper
    
BootstrapUI FlashHelper
    
BootstrapUI PaginatorHelper

License

The MIT License (MIT)
Fork

This plugin is a fork of https://github.com/elboletaire/twbs-cake-plugin plugin Òscar Casajuana (a.k.a. elboletaire).

I am very grateful to all who share their knowledge and allow solve our problems and we will improve our lives.

Especially like to thank Òscar Casajuana, for sharing his excellent work over which created this.