You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,25 @@
12
12
</a>
13
13
14
14
15
-
##What's phpMv-UI ?
15
+
##What's phpMv-UI ?
16
16
17
17
phpMv-UI is a visual components library for php : a php wrapper for jQuery and UI components (jQuery, Twitter Bootstrap, Semantic-UI).
18
18
19
19
Using the dependency injection, the jQuery object can be injected into **php framework container**, allowing for the generation of jQuery scripts in controllers, respecting the MVC design pattern.
It is necessary to inject the JQuery service at application startup, in the service file **app/config/services.php**, and if necessary instantiate Semantic, Bootstrap or Jquery-ui :
87
87
```php
@@ -92,7 +92,7 @@ $di->set("jquery",function(){
92
92
});
93
93
```
94
94
95
-
####Use in controllers
95
+
####Use in controllers
96
96
Example of creating a Semantic-UI button
97
97
98
98
```php
@@ -111,12 +111,12 @@ class ExempleController extends Controller{
If you want CodeIgniter to use a Composer auto-loader, just set `$config['composer_autoload']` to `TRUE` or a custom path in **application/config/config.php**.
116
116
117
117
Then, it's necessary to create a library for the JsUtils class
118
118
119
-
#####Library creation
119
+
#####Library creation
120
120
Create the library **XsUtils** (the name is free) in the folder **application/libraries**
121
121
122
122
```php
@@ -127,7 +127,7 @@ class XsUtils extends Ajax\php\ci\JsUtils{
127
127
}
128
128
}
129
129
```
130
-
####Injection of the service
130
+
####Injection of the service
131
131
Add the loading of the **XsUtils** library in the file **application/config/autoload.php**
132
132
133
133
The jquery member will be accessible in the controllers
The classes in the installed Composer packages can be autoloaded using the Composer autoloader. Make sure the entry script of your application contains the following lines to install the Composer autoloader:
189
189
```php
190
190
require(__DIR__ . '/../vendor/autoload.php');
@@ -194,7 +194,7 @@ In the same file, register a new dependency :
If you do not use the Composer autoloader file, you can also load phpMv-UI with [Ps4ClassLoader](http://symfony.com/doc/current/components/class_loader/psr4_class_loader.html) :
220
220
221
221
```php
@@ -227,7 +227,7 @@ $loader = new Psr4ClassLoader();
Copy the file **JsUtilsComponent.php** located in **vendor/phpmv/php-mv-ui/Ajax/php/cakephp** to the **src/controller/component** folder of your project
278
278
279
-
####Component loading in controllers
279
+
####Component loading in controllers
280
280
Add the **JsUtils** component loading in the initialize method of the base controller **AppController**, located in **src/controller/appController.php**
281
281
```php
282
282
public function initialize(){
@@ -287,7 +287,7 @@ Add the **JsUtils** component loading in the initialize method of the base contr
0 commit comments