承接 pedro151/zfcomplement 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pedro151/zfcomplement

Composer 安装命令:

composer require pedro151/zfcomplement

包简介

Este pacote foi criado apenas para complementar Zend Framework 2

README 文档

README

Zend Framework 2 - JQuery Validate

Install for composer: "pedro151/zfcomplement": "dev-master"

  1. move the 'js' folder to the 'public'

  2. 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);
            }
        )
    ),
  1. with a view/layout/layout.php enter the above code the function headScript and InlineScript
    <?php $this->jquery()->get('validate');?>
  1. use the function below the controller to enter forms in view:
        $this->getEvent ()
             ->getViewModel ()
             ->setVariables ( array('form'=>$form) );

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-01-13