定制 pawsitiwe/sulu-turnstile-bundle 二次开发

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

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

pawsitiwe/sulu-turnstile-bundle

最新稳定版本:0.0.5

Composer 安装命令:

composer require pawsitiwe/sulu-turnstile-bundle

包简介

Cloudflare Turnstile integration for Sulu FormBundle (fully automatic).

README 文档

README

Cloudflare Turnstile integration for Sulu FormBundle (fully automatic).

This bundle is a wrapper for the Pixel-Open Cloudflare Turnstile Bundle and allows you to easily add Turnstile captchas as Dynamic FormFields in Sulu without manually configuring services or XML.

Features

  • Adds a Turnstile Dynamic FormFieldType automatically.
  • Fully compatible with Sulu 2.x.
  • No manual project modifications required.
  • Installable via composer require.
  • Field appears automatically in the Sulu Admin.

Installation

1. Install the bundle via Composer

composer require pawsitiwe/sulu-turnstile-bundle

2. Register the bundle

If Symfony Flex is enabled, it should register automatically in config/bundles.php:

return [
    // ...
    PixelOpen\CloudflareTurnstileBundle\PixelOpenCloudflareTurnstileBundle::class => ['all' => true],
    Pawsitiwe\SuluTurnstileBundle\PawsitiweSuluTurnstileBundle::class => ['all' => true],
];

3. Add configuration

Add a config file into config/packages/pixel_open_cloudflare_turnstile.yaml :

pixel_open_cloudflare_turnstile:
    key: '%env(TURNSTILE_KEY)%'
    secret: '%env(TURNSTILE_SECRET)%'
    enable : true

4. Add Cloudflare API credentials to your environment variables

Visit Cloudflare to create your site key and secret key and add them to your .env file.

TURNSTILE_KEY="1x00000000000000000000AA"
TURNSTILE_SECRET="2x0000000000000000000000000000000AA"

5. Clear the cache

bin/console cache:clear

Usage in Sulu Admin

  1. After installation, the Turnstile field is automatically available in the Dynamic FormFieldType dropdown.
  2. The field can be configured like any other Dynamic FormField.

Requirements

Note

This bundle is only a Sulu wrapper for the official Pixel-Open Cloudflare Turnstile Bundle. It handles:

  • Registration as a Dynamic FormFieldType
  • XML field setup
  • Easy usage in the Sulu Admin

The actual Captcha logic remains fully handled by the original bundle.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-03