承接 priotas/twig-qrcode-extension 相关项目开发

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

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

priotas/twig-qrcode-extension

最新稳定版本:v1

Composer 安装命令:

composer require priotas/twig-qrcode-extension

包简介

A Twig extension for embedding inline QR codes in Twig templates

README 文档

README

Build Status

Overview

  • A Twig extension for embedding inline QR codes in Twig templates.
  • The standard filter output is a DataURL string of the processed text.
composer require priotas/twig-qrcode-extension
<!-- index.html.twig -->
<!DOCTYPE html>
<html>
    <body>

        <img src="{{ 'http://kewl.example.com' | qrcode(size=200) }}" />
    
    </body>
</html>

use Priotas\Twig\Extension\QrCode;

$loader = new \Twig_Loader_Filesystem(__DIR__);
$twig = new \Twig_Environment($loader);
$twig->addExtension(new QrCode());

echo $twig->render('index.html.twig');

Available filter options

Option Type Default Description
type string png The image type. Available types are png,eps,svg
label string A label for the QR code
size integer 200 The size of the QR code
version integer auto The version of the QR code. Range 1-40
svg string data_uri How a SVG should be rendered. data_uri is a data:svg+xml blob. inline is an inline svg tag

Dependencies

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-09-18