Phalcon-JQuery is a PHP library compatible with the Framework Phalcon. It allows to easily integrate jQuery, jQuery UI or Bootstrap in Phalcon Web projects, respecting the separation of MVC layers. |
'application' => array( 'controllersDir' => __DIR__ . '/../../app/controllers/', 'modelsDir' => __DIR__ . '/../../app/models/', 'viewsDir' => __DIR__ . '/../../app/views/', 'pluginsDir' => __DIR__ . '/../../app/plugins/', 'libraryDir' => __DIR__ . '/../../app/library/', 'cacheDir' => __DIR__ . '/../../app/cache/', 'baseUri' => '/atp/', ) </config> |
For adding Phalcon-JQuery to a Phalcon project, it is necessary to inject the JQuery service at application startup :
$di->set("jquery",function(){ $jquery= new JsUtils(array("driver"=>"Jquery")); $jquery->ui(new JqueryUI());//optional for JQuery UI $jquery->bootstrap(new Bootstrap());//Optional for Twitter Bootstrap return $jquery; });