pedro151 / zfcomplement
There is no license information available for the latest version (dev-master) of this package.
Este pacote foi criado apenas para complementar Zend Framework 2
dev-master
2015-01-19 11:40 UTC
Requires
- php: >=5.4
- zendframework/zendframework: 2.*
This package is not auto-updated.
Last update: 2020-01-10 15:28:42 UTC
README
Zend Framework 2 - JQuery Validate
Install for composer: "pedro151/zfcomplement": "dev-master"
-
move the 'js' folder to the 'public'
-
in
config/autoload/global.php
insert:
'zf-complement' => array ( 'jquery' => array ( 'version' => "2.1.3", //optional 'ui-version' => "1.11.2", //optional 'enable' => true, //optional 'ui-enable' => false, //optional 'local-path' => '/js/jquery/jquery.js', //optional 'ui-local-path' => null, //optional 'ui-enable' => false, //optional 'load-ssl-path' => true, //optional 'validate' => array ( 'useTwitterBootstrap' => true, //optional 'validate-path' => '/js/validate/' //optional ) ), )
3)in module.config.php
insert:
'view_helpers' => array ( 'factories' => array ( 'Jquery' => function ( $sm ) { return new ZfComplement\JQuery\View\Helper\Jquery($sm); } ) ),
- with a
view/layout/layout.php
enter the above code the functionheadScript
andInlineScript
<?php $this->jquery()->get('validate');?>
- use the function below the controller to enter forms in view:
$this->getEvent () ->getViewModel () ->setVariables ( array('form'=>$form) );