Edit this page

QRCode PHP Class Overview

The Kendo UI QRCode for PHP is a server-side wrapper for the Kendo UI QRCode widget.

Getting Started

Configuration

Below are listed the steps for you to follow when configuring the Kendo UI QRCode for PHP.

Step 1 Make sure you followed all the steps from the introductory article on Telerik UI for PHP—include the autoloader, JavaScript, and CSS files.

Step 2 Add a QRCode.

Example
    $qrcode = new \Kendo\Dataviz\UI\QRCode('qrcode');
    $qrcode->value("foo");

Step 3 Choose the appropriate error correction level and encoding.

Example
    $qrcode = new \Kendo\Dataviz\UI\QRCode('qrcode');
    $qrcode->value("foo")
           ->errorCorrection("H")
           ->encoding("UTF_8");

Step 4 Output the QRCode by echoing the result of the render method.

Example
    echo $qrcode->render();

Reference

Client-Side Instances

You are able to reference an existing QRCode instance via the jQuery.data(). Once a reference is established, use the QRCode API to control its behavior.

Example
    //Put this after your Kendo QRCode for PHP render() call
    <script>
    $(function() {
        // Notice that the Name() of the qrcode is used to get its client-side instance
        var qrcode = $("#qrcode").data("kendoQRCode");
    });
    </script>

See Also

Other articles on Telerik UI for PHP and on the QRCode:

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy