Advertisement
Guest User

Diemuzi

a guest
Feb 10th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.07 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Zend Framework
  4.  *
  5.  * LICENSE
  6.  *
  7.  * This source file is subject to the new BSD license that is bundled
  8.  * with this package in the file LICENSE.txt.
  9.  * It is also available through the world-wide-web at this URL:
  10.  * http://framework.zend.com/license/new-bsd
  11.  * If you did not receive a copy of the license and are unable to
  12.  * obtain it through the world-wide-web, please send an email
  13.  * to license@zend.com so we can send you a copy immediately.
  14.  *
  15.  * @category   Zend
  16.  * @package    Zend_Dojo
  17.  * @subpackage View
  18.  * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  19.  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  20.  * @version    $Id: Button.php 23775 2011-03-01 17:25:24Z ralph $
  21.  */
  22.  
  23. /** Zend_Dojo_View_Helper_Dijit */
  24. require_once 'Zend/Dojo/View/Helper/Dijit.php';
  25.  
  26. /**
  27.  * Dojo Button dijit
  28.  *
  29.  * @uses       Zend_Dojo_View_Helper_Dijit
  30.  * @package    Zend_Dojo
  31.  * @subpackage View
  32.  * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  33.  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  34.   */
  35. class Zend_Dojo_View_Helper_BusyButton extends Zend_Dojo_View_Helper_Dijit
  36. {
  37.     /**
  38.      * Dijit being used
  39.      * @var string
  40.      */
  41.     protected $_dijit  = 'dojox.form.BusyButton';
  42.  
  43.     /**
  44.      * Dojo module to use
  45.      * @var string
  46.      */
  47.     protected $_module = 'dojox.form.BusyButton';
  48.  
  49.     /**
  50.      * dijit.form.Button
  51.      *
  52.      * @param  string $id
  53.      * @param  string $value
  54.      * @param  array $params  Parameters to use for dijit creation
  55.      * @param  array $attribs HTML attributes
  56.      * @return string
  57.      */
  58.     public function busyButton($id, $value = null, array $params = array(), array $attribs = array())
  59.     {
  60.         $attribs['name'] = $id;
  61.         if (!array_key_exists('id', $attribs)) {
  62.             $attribs['id'] = $id;
  63.         }
  64.         $attribs = $this->_prepareDijit($attribs, $params, 'element');
  65.  
  66.         return $this->view->formButton($id, $value, $attribs);
  67.     }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement