nextbox/neos-qrcode

NextBox Neos Qr-Code 生成器

1.1.0 2023-04-12 08:07 UTC

This package is auto-updated.

Last update: 2024-09-12 11:19:27 UTC


README

此包为 Neos 的缩短 URL 创建 QR 码。注意,此包需要 nextbox/neos-qrcode

如果缩短的 URL 发生更改,则持久化的 QRCode 将立即重新生成,旧图片将被删除。

配置

按照包 nextbox/neos-qrcode 的 ReadMe 中的步骤创建自己的短 URL 重定向定义。

路由

创建一个新的 Routes.yaml,其名称应与应使用的类型相匹配

# Configuration/Routes.yaml

-
  name: 'Create QR-Code for default'
  uriPattern: 'qr-code/{shortIdentifier}' # replace `qr-code` with your preferences
  defaults:
    '@package': 'NextBox.Neos.QrCode'
    '@controller': 'QrCode'
    '@action': 'generateQrCode'
    'shortType': 'default' # change this to the name of the type from the settings
  appendExceedingArguments: true
  httpMethods: ['GET']

禁用后端图片生成

如果您想禁用后端图片生成,请禁用以下设置。节点发布后,资源将被删除。

# Settings.yaml

NextBox:
  Neos:
    QrCode:
      backend:
        # Should QR-Codes be generated from the backend after a node publish?
        generateQrCodesFromBackend: false

可扩展性

按照包 nextbox/neos-qrcode 的 ReadMe 中的步骤创建自己的短 URL 重定向定义。

QRCode-Controller 使用标识符和类型来获取缩短的 URL。