dev-master
9999999-devGerrymcdonnell/Pushy plugin for CakePHP
The Requires
- php >=5.4.16
- cakephp/cakephp ~3.0
The Development Requires
Gerrymcdonnell/Pushy plugin for CakePHP
You can install this plugin into your CakePHP application using composer., (*1)
The recommended way to install composer packages is:, (*2)
composer require gerrymcdonnell/pushy:dev-master
1) Add to your bootstrap file;, (*3)
Plugin::load('Gerrymcdonnell/Pushy',['routes' => true]);
2) Add to your default layout just after the start of the body tag; ```//pass title of menu to element echo $this->element('Gerrymcdonnell/Pushy.newpushymenu',['pushymenutitle'=>'Pushy Menu']);, (*4)
3) Add Jquery library to your default template; eg echo $this->Html->script('https://code.jquery.com/jquery-1.12.4.min.js'); 4) create the following two database tables;
pushymenus
CREATE TABLE pushymenus
(
id
int(11) NOT NULL,
title
varchar(100) NOT NULL,
controller
varchar(100) NOT NULL,
action
varchar(100) NOT NULL,
plugin
varchar(50) NOT NULL DEFAULT 'false',
created
datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;, (*5)
--, (*6)
pushymenus_items
CREATE TABLE pushymenus_items
(
id
int(11) NOT NULL,
title
varchar(100) NOT NULL,
pushymenu_id
int(11) NOT NULL,
controller
varchar(100) NOT NULL,
action
varchar(100) NOT NULL,
plugin
varchar(50) NOT NULL DEFAULT 'false',
created
datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;, (*7)
--, (*8)
pushymenus
ALTER TABLE pushymenus
ADD PRIMARY KEY (id
);, (*9)
--, (*10)
pushymenus_items
ALTER TABLE pushymenus_items
ADD PRIMARY KEY (id
);, (*11)
--, (*12)
pushymenus
ALTER TABLE pushymenus
, (*13)
id
int(11) NOT NULL AUTO_INCREMENT;pushymenus_items
ALTER TABLE pushymenus_items
MODIFY id
int(11) NOT NULL AUTO_INCREMENT;
```, (*14)
5) Add items to these tables; you can access the menu controller at;, (*15)
http://localhost/[yourcakefolder]/gerrymcdonnell/pushy/pushymenus, (*16)
More info to come., (*17)
Gerrymcdonnell/Pushy plugin for CakePHP