Skip to content

Commit d6bcdbc

Browse files
authored
CakePhp doc
1 parent 473da96 commit d6bcdbc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,23 @@ class DefaultController extends Controller{
268268
}
269269
}
270270
```
271+
### <img src="http://angular.kobject.net/git/images/cake.png" width="30"> CakePhp configuration
272+
273+
####Component creation
274+
Copy the file **JsUtilsComponent.php** located in **vendor/phpmv/php-mv-ui/Ajax/php/cakephp** to the **src/controller/component** folder of your project
275+
276+
####Component loading in controllers
277+
Add the **JsUtils** component loading in the initialize method of the base controller **AppController**, located in **src/controller/appController.php**
278+
```php
279+
public function initialize(){
280+
parent::initialize();
281+
282+
$this->loadComponent('RequestHandler');
283+
$this->loadComponent('Flash');
284+
$this->loadComponent('JsUtils',["semantic"=>true]);
285+
}
286+
```
287+
####Usage
288+
289+
the jquery object in controller will be accessible on
290+
`$this->JsUtils->jquery`

0 commit comments

Comments
 (0)