en:slam4:php:phalcon:jquery

Phalcon-JQuery

Phalcon-JQuery logo 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.

  1. Download Phalcon-JQuery on gitHub
  2. Unzip the archive in a local folder and copy the Ajax folder and his content in the folder libraries defined in your Phalcon configuration file :

Intégration de la librairie Phalcon-JQuery dans un projet
    '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;
});

  • en/slam4/php/phalcon/jquery.txt
  • Dernière modification : il y a 5 ans
  • de 127.0.0.1