定制 lukaschel/pimcore-recaptcha 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

lukaschel/pimcore-recaptcha

Composer 安装命令:

composer require lukaschel/pimcore-recaptcha

包简介

Pimcore bundle to use recaptcha v3 in symfony forms

README 文档

README

With this Pimcore bundle it is possible to integrate the Google ReCaptcha v3 logic into symfony forms.

Installation

"require" : {
    "lukaschel/pimcore-recaptcha" : "~1.0.0"
}

Usage

After enabling and installing the bundle in the Pimcore backends, the bundle configuration can be used to set Recaptcha keys for each page.

Form integration

Subsequently, a hidden input field can be deposited in the respective form:

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('g_recaptcha_response', HiddenType::class, [
            'attr' => [
                'class' => 'g-recaptcha-response-input'
            ]
        ]);
}

Now you only have to validate the input field in your controller when your form is submitted:

if ($form->isSubmitted() &&
    $form->isValid() &&
    $this->container->get('lukaschel.recaptcha')->validate($request->request->get('FORM_NAME')['g_recaptcha_response'])
    ) {
    ...
}

Copyright and license

For licensing details please visit LICENSE.md

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2019-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固