Skip to content

Commit 1e14e57

Browse files
authored
Update README.md
1 parent 222b0d2 commit 1e14e57

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,33 @@ Whatever the php framework used, with "composer", it is enough to integrate the
6767
```php
6868
require_once("vendor/autoload.php");
6969
```
70+
### <img src="http://angular.kobject.net/git/images/ubiquity.png" width="30"> Ubiquity configuration
71+
72+
#### Library loading
73+
The library is already loaded by default in the config file **app/config/config.php** :
74+
75+
```php
76+
"di"=>array(
77+
"@exec"=>array("jquery"=>function ($controller){
78+
return \Ubiquity\core\Framework::diSemantic($controller);
79+
})
80+
),
81+
```
82+
#### Use in controllers
83+
Example of creating a Semantic-UI button
84+
85+
```php
86+
/**
87+
* @property \Ajax\php\ubiquity\JsUtils $jquery
88+
**/
89+
class ExempleController extends Controller{
90+
public function index(){
91+
$semantic=$this->jquery->semantic();
92+
$button=$semantic->htmlButton("btTest","Test Button");
93+
echo $button;
94+
}
95+
}
96+
```
7097
### <img src="http://angular.kobject.net/git/images/phalcon.png" width="30"> Phalcon configuration
7198

7299
#### Library loading

0 commit comments

Comments
 (0)