PHP Classes

File: Usage.php

Recommend this page to a friend!
  Classes of muneeb aslam  >  PHP Modal Box  >  Usage.php  >  Download  
File: Usage.php
Role: Example script
Content type: text/plain
Description: How to use the class
Class: PHP Modal Box
Display modal boxes using Bootstrap
Author: By
Last change:
Date: 3 years ago
Size: 1,204 bytes


Class file image Download
= new ModalBox;
//lets first set the modal id
//Set the title of to be used in header (optional)
$varName->setTitle("modal title");
// Set the body content of the modal
$varName->setBodyContent("modal body content");
// Set the footer of the modal (optional)
$varName->setFooterContent("modal footer content");
    // Finally initiate the function to build the modal
    // This function has the following 6 arguments
    // 1. Modal Animation Type: fade etc. Put 'false' in single quotes to disable it
    // 2. Modal Header display Option. Boolean (true/ false)
    // 3. Modal Header Title display Option. Boolean (true/ false)
    // 4. Modal Close X on top Option. Boolean (true/ false)
    // 5. Modal Footer Display Option. Boolean (true/ false)
    // 6. Modal Footer close button display Option. Boolean (true/ false)
    // The following parameters will add a modal of fade animation with everything (header, title, buttons footer etc) displayed
// NOTE: You will manualy need to add a button bound to this modal and add data-target as modal id.