2017 © Pedro Peláez
 

symfony-bundle qrcode-bundle

Symfony 3 bundle integrate QRcode into a Symfony project

image

uc/qrcode-bundle

Symfony 3 bundle integrate QRcode into a Symfony project

  • Thursday, July 6, 2017
  • by praesyx
  • Repository
  • 2 Watchers
  • 1 Stars
  • 283 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

UniCenter QRCode Bundle

Installation

To install this bundle, run the command below and you will get the latest version from [Packagist][3]., (*1)

@see https://github.com/Endroid/QrCode ``` bash composer require endroid/qrcode, (*2)


Then enable it in your kernel: ``` php // app/AppKernel.php public function registerBundles() { $bundles = [ // ... new Endroid\QrCode\Bundle\EndroidQrCodeBundle(), ]; }

@see https://github.com/KnpLabs/KnpSnappyBundle, (*3)

With composer, add: ``` php { "require": { "knplabs/knp-snappy-bundle": "~1.4" } }, (*4)


Then enable it in your kernel: ``` php // app/AppKernel.php public function registerBundles() { $bundles = array( //... new Knp\Bundle\SnappyBundle\KnpSnappyBundle(), //...

And set-up the required configuration ``` yaml, (*5)

app/config/config.yml

knp_snappy: pdf: enabled: true binary: /usr/local/bin/wkhtmltopdf #"\"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe\"" for Windows users options: [] image: enabled: true binary: /usr/local/bin/wkhtmltoimage #"\"C:\Program Files\wkhtmltopdf\bin\wkhtmltoimage.exe\"" for Windows users options: [], (*6)


``` bash composer require sfk/email-template-bundle dev-master

``` bash composer require uc/qrcode-bundle dev-master, (*7)


Load required bundles in AppKernel.php: ``` php // app/AppKernel.php public function registerBundles() { $bundles = array( // [...] new Uc\PaymentBundle\UcQCodeBundle(), ); }
Create a QRCode

``` php /** * $vars = [ * 'code' => '' // Encode string, * 'orderId' => '' // Order ID * ] * @return string = '/uploads/tmp/orderId . date('dmY') .svg' // file location */ $QManager->generateQCode($vars = []);, (*8)


###### Build a PDF ``` php /** * $vars = [ * 'html' => '' //Html content which will be processed to pdf * 'name' => '' //PDF name * ] * @return array = [ * 'path' => '' //File location * 'pdf' => '' //PDF raw * ] */ $PDFManger->progressPDF($vars = []);
Send email

php /** * $vars = [ * 'sender' => '' //Email sender * 'recipient' => '' //Email recipient * 'subject' => '' //Email subject * 'body' => '' //Email body * 'pdf' => '' //Attachment pdf file location * ] */ $DeliveryManager->onSendEmail($vars = []);, (*9)

The Versions

06/07 2017

dev-master

9999999-dev https://github.com/Zeppelinen-DevOps/symfony2-qrcode-bundle

Symfony 3 bundle integrate QRcode into a Symfony project

  Sources   Download

GNU v3

The Requires

 

by Avatar praesyx