Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions LICENSE

This file was deleted.

34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
# CakeAdmin plugin for CakePHP
# Bakkerij/CakeAdmin plugin for CakePHP

> Note: This is a non-stable plugin for CakePHP 3.x at this time. It is currently under development and should be considered experimental.
## Install CakePHP

Note: This is only required if you do not already have a project started.

```
$ composer self-update && composer create-project --prefer-dist cakephp/app {your new project name}
```

## Installation

You can find the installation-guide here: http://cakemanager.org/docs/cakeadmin/1.0/installation/.
You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
$ composer require bakkerij/cakeadmin:dev-rewrite
```

## Load Plugin

## Documentation
```
$ bin/cake plugin load -b -r Bakkerij/CakeAdmin
```

Documentation is available at http://cakemanager.org/docs/cakeadmin/1.0/.
## Update Database Info

## Strategy
Navigate to the new project's config/app.php and update your Datasources username, password, and database.

We are working on this version. Wanna read more about our strategy? Read the following post: http://cakemanager.org/new-cakeadmin-plugin-announced/
## Load CakeAdmin Tables

```
$ bin/cake migrations migrate -p Bakkerij/CakeAdmin
```

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cakemanager/cakephp-cakeadmin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22 changes: 9 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
{
"name": "cakemanager/cakephp-cakeadmin",
"description": "CakeAdmin plugin for CakePHP",
"name": "bakkerij/cakeadmin",
"description": "Admin plugin for CakePHP",
"type": "cakephp-plugin",
"require": {
"php": ">=5.4.16",
"cakephp/cakephp": "~3.1",
"cakemanager/cakephp-utils": "dev-master",
"cakemanager/cakephp-notifier": "dev-master",
"cakemanager/cakephp-settings": "dev-master",
"cakemanager/cakeadmin-lightstrap": "dev-master"
"cakephp/cakephp": "~3.0",
"friendsofcake/crud": "^4.3",
"gourmet/knp-menu": "~0.4"
},
"require-dev": {
"phpunit/phpunit": " 4.1.*@dev",
"cakephp/cakephp-codesniffer": "2.*"
"phpunit/phpunit": "*"
},
"autoload": {
"psr-4": {
"CakeAdmin\\": "src"
"Bakkerij\\CakeAdmin\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"CakeAdmin\\Test\\": "tests",
"Bakkerij\\CakeAdmin\\Test\\": "tests",
"Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
}
},
"minimum-stability": "dev"
}
}
70 changes: 0 additions & 70 deletions config/Migrations/20150611195820_cakeadmin_initial.php

This file was deleted.

51 changes: 51 additions & 0 deletions config/Migrations/20160716113123_Initial.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
use Migrations\AbstractMigration;

class Initial extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
{
$table = $this->table('cakeadmin_administrators', ['id' => false, 'primary_key' => ['id']]);
$table
->addColumn('id', 'uuid', [
'default' => null,
'limit' => null,
'null' => false,
])
->addColumn('name', 'string', [
'default' => null,
'limit' => 150,
'null' => false,
])
->addColumn('email', 'string', [
'default' => null,
'limit' => 50,
'null' => true,
])
->addColumn('password', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
])
->addColumn('active', 'integer', [
'default' => 0,
'limit' => 1,
'null' => true,
])
->addColumn('request_key', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
])
->addColumn('created', 'datetime')
->addColumn('modified', 'datetime')
->create();
}
}
Binary file added config/Migrations/schema-dump-default.lock
Binary file not shown.
70 changes: 18 additions & 52 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,67 +1,33 @@
<?php
/**
* CakeManager (http://cakemanager.org)
* Copyright (c) http://cakemanager.org
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) http://cakemanager.org
* @link http://cakemanager.org CakeManager Project
* @since 1.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/

use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\ORM\TableRegistry;
use Settings\Core\Setting;
use Cake\Event\EventManager;
use CakeAdmin\Event\CakeAdminMailer;
use Notifier\Utility\NotificationManager;

# Plugins
Plugin::load('Utils', []);
Plugin::load('Settings', ['bootstrap' => true, 'routes' => true]);
Plugin::load('Notifier', ['bootstrap' => true, 'routes' => true]);
// Load Crud plugin
if(!Plugin::loaded('Crud')) {
Plugin::load('Crud');
}

// Load Knp plugin
if(!Plugin::loaded('Gourmet/KnpMenu')) {
Plugin::load('Gourmet/KnpMenu');
}

# Configurations
// Sessions timeout
Configure::write('Session.timeout', 4320);

Configure::write('CA.theme', 'CakeAdmin');
Configure::write('CA.viewClass', null);

Configure::write('CA.layout.default', 'CakeAdmin.default');
Configure::write('CA.layout.login', 'CakeAdmin.login');

// Configure login fields
Configure::write('CA.fields', [
'username' => 'email',
'password' => 'password'
]);

Configure::write('CA.email.from', ['admin@cakemanager.org' => 'Bob | CakeManager']);

Configure::write('CA.email.transport', 'default');

Configure::write('CA.Menu.main', []);

Configure::write('Settings.Prefixes.CA', 'CakeAdmin');

Configure::write('CA.PostTypes', []);

Configure::write('CA.Models.administrators', 'CakeAdmin.Administrators');


# Settings
Setting::register('App.Name', 'CakeAdmin Application');

# Theming
Plugin::load('LightStrap', ['bootstrap' => true, 'routes' => true]);

// Registered PostTypes
//Configure::write('CA.postTypes', [
// 'bookmarks' => 'Bookmarks'
//]);

# Notification Templates
NotificationManager::instance()->addTemplate('newAdministrator', [
'title' => 'New administrator has been registered',
'body' => ':email has been registered as administrator at :created'
// Custom menu items
Configure::write('CA.menu', [
'main' => []
]);
15 changes: 15 additions & 0 deletions config/init/CakeAdmin.default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App;

use Bakkerij\CakeAdmin\BaseCakeAdmin;
use Cake\Core\Plugin;

class CakeAdmin extends BaseCakeAdmin {

public function initialize()
{

}

}
Loading