Getting Started
5 Dec 20161 minute to read
This section explains briefly about the necessary steps required to render and configure EJ ToggleButton control using PHP wrapper classes.
Create a PHP Project and add necessary scripts and styles with the help of the given PHP Getting Started Documentation.
Create ToggleButton
Create a ToggleButton control by instantiating the PHP wrapper class available in EJ namespace as shown below.
<?php
$button = new EJ\ToggleButton("check15");
echo $button ->showRoundedCorner(true)->defaultText("Play")->activeText("Pause")->size("large")
->contentType("textandimage")->defaultPrefixIcon("e-icon e-mediaplay")->activePrefixIcon("e-icon e-mediapause")->render();
?>
The following screenshot illustrates the output of above code.