Beispiel #1
0
<?php

/* 
 * CContextMenu class file
 *
 * @author Christophe Boulain <*****@*****.**>
 * @license http://www.pradosoft.com/license
 * @version $Id: CContextMenu.php 126 2009-03-11 07:24:26Z tof $
 */
if (!prado::getPathOfAlias('CContextMenu')) {
    prado::setPathOfAlias('CContextMenu', dirname(__FILE__));
}
/**
 * CContextMenu class
 *
 * This class is a Prado wrapper to 'Proto.Menu' written by 'kangax'
 *
 * Properties :
 *	o ForControl : Id of control on which attach the contextual menu.
 *	o CssSelector: a css selector to find the controls to attach the menu (e.g. CssSelector=".className").
 *  o CssUrl : an url to an alternate css file. By default, the proto.menu.0.6.css will be used
 *  o CssClass : Css class of the menu (default to "menu desktop". See proto.menu.css for info)
 *  o Items : a collection of CContextMenuItem.
 *
 * If theses two properties are present, ForControl takes precedence.
 *
 * Events :
 *  o OnMenuItemSelected event is raised when a menu item is clicked. The event parameter contains the index of the clicked element, and its command name.
 *
 * Items Properties :
 *	o Text : Text of menu item
Beispiel #2
0
 /**
  *
  * Mendapatkan Path
  *
  */
 public function getPath($path = null)
 {
     $_path = prado::getPathOfAlias('Application') . DIRECTORY_SEPARATOR;
     if ($path === null) {
         return $path = $_path;
     } else {
         return $_path . $path . DIRECTORY_SEPARATOR;
     }
 }