Skip to content

Latest commit

 

History

History
122 lines (84 loc) · 5.9 KB

introduction.md

File metadata and controls

122 lines (84 loc) · 5.9 KB
title page_title description previous_url slug position
Overview
Overview | Progress Telerik UI for PHP
Download and install Progress Telerik UI for PHP, and run a sample application.
/tutorials/PHP/build-apps-with-kendo-ui-and-php, /tutorials/PHP/build-apps-with-kendo-ui-and-php-2, /php/widgets/map/overview, /using-kendo-with/php/widgets/map/overview, /php/widgets/responsivepanel/overview, /using-kendo-with/php/widgets/responsivepanel/overview, /php/widgets/spreadsheet/overview, /using-kendo-with/php/widgets/spreadsheet/overview, /php/widgets/treemap/overview
overview_uiforphp
1

Progress® Telerik® UI for PHP

Progress Telerik UI for PHP is a set of PHP classes which help you configure Kendo UI widgets by using server-side code in PHP websites.

Getting Started

Requirements

  • Progress Telerik UI for PHP requires a PHP 5.3.3+ version.
  • The sample application uses PDO and SQLite. Both extensions should be enabled in the PHP configuration (php.ini).
  • The phpinfo function can be used to verify that PDO and the SQLite extensions are successfully installed.

Download and Install

You can download Progress Telerik UI for PHP from the official download page. The distribution .zip file contains the following directories:

  • /js—These are the minified JavaScript files.
  • /styles—The minified CSS files and background images used by the themes.
  • /src—The JavaScript and CSS source files. Not available in the trial version.
  • /wrappers/php/lib/Kendo/—The PHP files required to use Progress Telerik UI for PHP.
  • /wrappers/php/—The sample PHP website.

Sample Application Setup

Prerequisites

You can find a sample PHP website in the /wrappers/php/ directory of the Progress Telerik UI for PHP distribution. To run the website, copy this directory to your web root. Then navigate to index.php.

Configuration

To use Progress Telerik UI for PHP in your PHP website, follow the steps below:

Step 1 Copy /wrappers/php/lib/Kendo to your website root, e.g. to your lib directory.

Step 2 Copy the Kendo UI JavaScript and CSS files from /js and /styles to your website root. If you prefer to use [Kendo UI CDN Service]({% slug kendoui_cdn_services_installation %}), skip this step and the following ones, and check the [article on the jQuery dependency]({% slug jquerysupport_kendoui %}) as well as the [article on the export libraries dependencies]({% slug export_support_kendoui %}).

Step 3 Include the Kendo UI JavaScript and CSS files in your PHP page.

Example
    <link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.web.min.js"></script>

Important

If you want to use Kendo UI widgets for the web, including the ones that render data visualization, at the same time, you should include kendo.all.min.js instead of kendo.web.min.js and kendo.dataviz.min.js. You can also create a custom JavaScript file by using the Custom Download Builder.

Step 4 Include the Kendo PHP Autoload file.

Example
    <?php require_once 'lib/Kendo/Autoload.php'; ?>

Step 5 Use any Kendo UI PHP wrapper.

Example
    <?php
    // Instantiate a new instance of the DatePicker class and specify its 'id'
    $datepicker = new \Kendo\UI\DatePicker('datepicker');

    // Configure the datepicker using the fluent API
    $datepicker->start('year')
               ->format('MMMM yyyy');

    // Output the datepicker HTML and JavaScript by echo-ing the result of the render method
    echo $datepicker->render();
    ?>

The example below demonstrates the complete source code.

Example
<!DOCTYPE html>
<html>
    <head>
        <link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
        <link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.web.min.js"></script>
    </head>
    <body>
    <?php require_once 'lib/Kendo/Autoload.php'; ?>
    <?php
    // Instantiate a new instance of the DatePicker class and specify its 'id'
    $datepicker = new \Kendo\UI\DatePicker('datepicker');

    // Configure the datepicker using the fluent API
    $datepicker->start('year')
               ->format('MMMM yyyy');

    // Output the datepicker HTML and JavaScript by echo-ing the result of the render method
    echo $datepicker->render();
    ?>
    </body>
</html>

Next Steps

Watch the video tutorials on getting started with Progress Telerik UI for PHP in the Kendo UI YouTube channel:

For more examples on how to use Kendo UI with PHP server-side wrappers, visit the GitHub repository with the collected Kendo UI examples on using PHP.

See Also