Current File : /home/k/a/r/karenpetzb/www/items/category/Decorator.zip |
PK dH[���c� �
DijitForm.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Dojo_Form_Decorator_DijitContainer */
require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php';
/**
* Zend_Dojo_Form_Decorator_DijitForm
*
* Render a dojo form dijit via a view helper
*
* Accepts the following options:
* - helper: the name of the view helper to use
*
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DijitForm.php 10009 2008-07-09 16:52:18Z matthew $
*/
class Zend_Dojo_Form_Decorator_DijitForm extends Zend_Dojo_Form_Decorator_DijitContainer
{
/**
* Render a form
*
* Replaces $content entirely from currently set element.
*
* @param string $content
* @return string
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
return $content;
}
$dijitParams = $this->getDijitParams();
$attribs = array_merge($this->getAttribs(), $this->getOptions());
return $view->form($element->getName(), $attribs, $content);
}
}
PK dH[�B?^� � DijitElement.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Form_Decorator_ViewHelper */
require_once 'Zend/Form/Decorator/ViewHelper.php';
/**
* Zend_Dojo_Form_Decorator_DijitElement
*
* Render a dojo dijit element via a view helper
*
* Accepts the following options:
* - separator: string with which to separate passed in content and generated content
* - placement: whether to append or prepend the generated content to the passed in content
* - helper: the name of the view helper to use
*
* Assumes the view helper accepts three parameters, the name, value, and
* optional attributes; these will be provided by the element.
*
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DijitElement.php 12690 2008-11-18 18:45:28Z alexander $
*/
class Zend_Dojo_Form_Decorator_DijitElement extends Zend_Form_Decorator_ViewHelper
{
/**
* Element attributes
* @var array
*/
protected $_attribs;
/**
* Element types that represent buttons
* @var array
*/
protected $_buttonTypes = array(
'Zend_Dojo_Form_Element_Button',
'Zend_Form_Element_Button',
'Zend_Form_Element_Reset',
'Zend_Form_Element_Submit',
);
/**
* Dijit option parameters
* @var array
*/
protected $_dijitParams = array();
/**
* Get element attributes
*
* @return array
*/
public function getElementAttribs()
{
if (null === $this->_attribs) {
$this->_attribs = parent::getElementAttribs();
if (array_key_exists('dijitParams', $this->_attribs)) {
$this->setDijitParams($this->_attribs['dijitParams']);
unset($this->_attribs['dijitParams']);
}
}
return $this->_attribs;
}
/**
* Set a single dijit option parameter
*
* @param string $key
* @param mixed $value
* @return Zend_Dojo_Form_Decorator_DijitContainer
*/
public function setDijitParam($key, $value)
{
$this->_dijitParams[(string) $key] = $value;
return $this;
}
/**
* Set dijit option parameters
*
* @param array $params
* @return Zend_Dojo_Form_Decorator_DijitContainer
*/
public function setDijitParams(array $params)
{
$this->_dijitParams = array_merge($this->_dijitParams, $params);
return $this;
}
/**
* Retrieve a single dijit option parameter
*
* @param string $key
* @return mixed|null
*/
public function getDijitParam($key)
{
$this->getElementAttribs();
$key = (string) $key;
if (array_key_exists($key, $this->_dijitParams)) {
return $this->_dijitParams[$key];
}
return null;
}
/**
* Get dijit option parameters
*
* @return array
*/
public function getDijitParams()
{
$this->getElementAttribs();
return $this->_dijitParams;
}
/**
* Render an element using a view helper
*
* Determine view helper from 'helper' option, or, if none set, from
* the element type. Then call as
* helper($element->getName(), $element->getValue(), $element->getAttribs())
*
* @param string $content
* @return string
* @throws Zend_Form_Decorator_Exception if element or view are not registered
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('DijitElement decorator cannot render without a registered view object');
}
$options = null;
$helper = $this->getHelper();
$separator = $this->getSeparator();
$value = $this->getValue($element);
$attribs = $this->getElementAttribs();
$name = $element->getFullyQualifiedName();
$dijitParams = $this->getDijitParams();
if ($element->isRequired()) {
$dijitParams['required'] = true;
}
$id = $element->getId();
if ($view->dojo()->hasDijit($id)) {
trigger_error(sprintf('Duplicate dijit ID detected for id "%s; temporarily generating uniqid"', $id), E_USER_NOTICE);
$base = $id;
do {
$id = $base . '-' . uniqid();
} while ($view->dojo()->hasDijit($id));
}
$attribs['id'] = $id;
if (array_key_exists('options', $attribs)) {
$options = $attribs['options'];
}
$elementContent = $view->$helper($name, $value, $dijitParams, $attribs, $options);
switch ($this->getPlacement()) {
case self::APPEND:
return $content . $separator . $elementContent;
case self::PREPEND:
return $elementContent . $separator . $content;
default:
return $elementContent;
}
}
}
PK dH[l��u u SplitContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Dojo_Form_Decorator_DijitContainer */
require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php';
/**
* SplitContainer
*
* Render a dijit SplitContainer
*
* @uses Zend_Dojo_Form_Decorator_DijitContainer
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SplitContainer.php 10009 2008-07-09 16:52:18Z matthew $
*/
class Zend_Dojo_Form_Decorator_SplitContainer extends Zend_Dojo_Form_Decorator_DijitContainer
{
/**
* View helper
* @var string
*/
protected $_helper = 'SplitContainer';
}
PK dH["غ� DijitContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Form_Decorator_Abstract */
require_once 'Zend/Form/Decorator/Abstract.php';
/**
* Zend_Dojo_Form_Decorator_DijitContainer
*
* Render a dojo dijit layout container via a view helper
*
* Accepts the following options:
* - helper: the name of the view helper to use
*
* Assumes the view helper accepts four parameters, the id, content, dijit
* parameters, and (X)HTML attributes; these will be provided by the element.
*
* @uses Zend_Form_Decorator_Abstract
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DijitContainer.php 10032 2008-07-10 16:47:19Z matthew $
*/
abstract class Zend_Dojo_Form_Decorator_DijitContainer extends Zend_Form_Decorator_Abstract
{
/**
* View helper
* @var string
*/
protected $_helper;
/**
* Element attributes
* @var array
*/
protected $_attribs;
/**
* Dijit option parameters
* @var array
*/
protected $_dijitParams;
/**
* Container title
* @var string
*/
protected $_title;
/**
* Get view helper for rendering container
*
* @return string
*/
public function getHelper()
{
if (null === $this->_helper) {
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('No view helper specified fo DijitContainer decorator');
}
return $this->_helper;
}
/**
* Get element attributes
*
* @return array
*/
public function getAttribs()
{
if (null === $this->_attribs) {
$attribs = $this->getElement()->getAttribs();
if (array_key_exists('dijitParams', $attribs)) {
unset($attribs['dijitParams']);
}
$this->_attribs = $attribs;
}
return $this->_attribs;
}
/**
* Get dijit option parameters
*
* @return array
*/
public function getDijitParams()
{
if (null === $this->_dijitParams) {
$attribs = $this->getElement()->getAttribs();
if (array_key_exists('dijitParams', $attribs)) {
$this->_dijitParams = $attribs['dijitParams'];
} else {
$this->_dijitParams = array();
}
$options = $this->getOptions();
if (array_key_exists('dijitParams', $options)) {
$this->_dijitParams = array_merge($this->_dijitParams, $options['dijitParams']);
$this->removeOption('dijitParams');
}
}
// Ensure we have a title param
if (!array_key_exists('title', $this->_dijitParams)) {
$this->_dijitParams['title'] = $this->getTitle();
}
return $this->_dijitParams;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
if (null === $this->_title) {
$title = null;
if (null !== ($element = $this->getElement())) {
if (method_exists($element, 'getLegend')) {
$title = $element->getLegend();
}
}
if (empty($title) && (null !== ($title = $this->getOption('legend')))) {
$this->removeOption('legend');
}
if (empty($title) && (null !== ($title = $this->getOption('title')))) {
$this->removeOption('title');
}
if (!empty($title)) {
if (null !== ($translator = $element->getTranslator())) {
$title = $translator->translate($title);
}
$this->_title = $title;
}
}
return (empty($this->_title) ? '' : $this->_title);
}
/**
* Render a dijit layout container
*
* Replaces $content entirely from currently set element.
*
* @param string $content
* @return string
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
return $content;
}
$dijitParams = $this->getDijitParams();
$attribs = array_merge($this->getAttribs(), $this->getOptions());
if (array_key_exists('legend', $attribs)) {
if (!array_key_exists('title', $dijitParams) || empty($dijitParams['title'])) {
$dijitParams['title'] = $attribs['legend'];
}
unset($attribs['legend']);
}
$helper = $this->getHelper();
$id = $element->getId() . '-' . $helper;
if ($view->dojo()->hasDijit($id)) {
trigger_error(sprintf('Duplicate dijit ID detected for id "%s; temporarily generating uniqid"', $id), E_USER_WARNING);
$base = $id;
do {
$id = $base . '-' . uniqid();
} while ($view->dojo()->hasDijit($id));
}
return $view->$helper($id, $content, $dijitParams, $attribs);
}
}
PK dH[)�z z BorderContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Dojo_Form_Decorator_DijitContainer */
require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php';
/**
* BorderContainer
*
* Render a dijit BorderContainer
*
* @uses Zend_Dojo_Form_Decorator_DijitContainer
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BorderContainer.php 10009 2008-07-09 16:52:18Z matthew $
*/
class Zend_Dojo_Form_Decorator_BorderContainer extends Zend_Dojo_Form_Decorator_DijitContainer
{
/**
* View helper
* @var string
*/
protected $_helper = 'BorderContainer';
}
PK dH[�r$�( ( AccordionContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AccordionContainer.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetContainer
*/
require_once "UiWidgetContainer.php";
/**
* Form Decorator for jQuery Accordion View Helper
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_AccordionContainer extends ZendX_JQuery_Form_Decorator_UiWidgetContainer
{
protected $_helper = "accordionContainer";
}PK dH[�4�� AccordionPane.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AccordionPane.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetContainer
*/
require_once "UiWidgetPane.php";
/**
* Form Decorator for jQuery Accordion Pane View Helper
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_AccordionPane extends ZendX_JQuery_Form_Decorator_UiWidgetPane
{
protected $_helper = "accordionPane";
}PK dH[J��sv v StackContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Dojo_Form_Decorator_DijitContainer */
require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php';
/**
* StackContainer
*
* Render a dijit StackContainer
*
* @uses Zend_Dojo_Form_Decorator_DijitContainer
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: StackContainer.php 10009 2008-07-09 16:52:18Z matthew $
*/
class Zend_Dojo_Form_Decorator_StackContainer extends Zend_Dojo_Form_Decorator_DijitContainer
{
/**
* View helper
* @var string
*/
protected $_helper = 'StackContainer';
}
PK dH[��� TabContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TabContainer.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetContainer
*/
require_once "UiWidgetContainer.php";
/**
* Form Decorator for jQuery Tabs View Helper
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_TabContainer extends ZendX_JQuery_Form_Decorator_UiWidgetContainer
{
protected $_helper = "tabContainer";
}PK dH[��f f ContentPane.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Dojo_Form_Decorator_DijitContainer */
require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php';
/**
* ContentPane
*
* Render a dijit ContentPane
*
* @uses Zend_Dojo_Form_Decorator_DijitContainer
* @package Zend_Dojo
* @subpackage Form_Decorator
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ContentPane.php 10009 2008-07-09 16:52:18Z matthew $
*/
class Zend_Dojo_Form_Decorator_ContentPane extends Zend_Dojo_Form_Decorator_DijitContainer
{
/**
* View helper
* @var string
*/
protected $_helper = 'ContentPane';
}
PK DyH[�<�( ( UiWidgetElementMarker.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
/**
* Marking UiWidgetElement rendering decorator.
*
* Marker Interface to make sure that programmer using ZendX_JQuery is not
* switching ZendX_JQuery_Form_Decorator_UiWidgetElement with Zend_Form_Decorator_ViewHelper
* without noticing that this is not possible.
*/
interface ZendX_JQuery_Form_Decorator_UiWidgetElementMarker {
}PK DyH[��g}� � UiWidgetElement.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UiWidgetElement.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
/**
* @see Zend_Form_Decorator_ViewHelper
*/
require_once "Zend/Form/Decorator/ViewHelper.php";
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetElementMarker
*/
require_once "ZendX/JQuery/Form/Decorator/UiWidgetElementMarker.php";
/**
* Abstract Form Decorator for all jQuery UI Form Elements
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_UiWidgetElement
extends Zend_Form_Decorator_ViewHelper
implements ZendX_JQuery_Form_Decorator_UiWidgetElementMarker
{
/**
* Element attributes
*
* @var array
*/
protected $_attribs;
/**
* jQuery UI View Helper
*
* @var ZendX_JQuery_View_Helper_UiWidget
*/
public $helper;
/**
* jQuery related attributes/options
*
* @var array
*/
protected $_jQueryParams = array();
/**
* Get element attributes
*
* @return array
*/
public function getElementAttribs()
{
if (null === $this->_attribs) {
if($this->_attribs = parent::getElementAttribs()) {
if (array_key_exists('jQueryParams', $this->_attribs)) {
$this->setJQueryParams($this->_attribs['jQueryParams']);
unset($this->_attribs['jQueryParams']);
}
}
}
return $this->_attribs;
}
/**
* Set a single jQuery option parameter
*
* @param string $key
* @param mixed $value
* @return ZendX_JQuery_Form_Decorator_UiWidgetElement
*/
public function setJQueryParam($key, $value)
{
$this->_jQueryParams[(string) $key] = $value;
return $this;
}
/**
* Set jQuery option parameters
*
* @param array $params
* @return ZendX_JQuery_Form_Decorator_UiWidgetElement
*/
public function setJQueryParams(array $params)
{
$this->_jQueryParams = array_merge($this->_jQueryParams, $params);
return $this;
}
/**
* Retrieve a single jQuery option parameter
*
* @param string $key
* @return mixed|null
*/
public function getJQueryParam($key)
{
$this->getElementAttribs();
$key = (string) $key;
if (array_key_exists($key, $this->_jQueryParams)) {
return $this->_jQueryParams[$key];
}
return null;
}
/**
* Get jQuery option parameters
*
* @return array
*/
public function getJQueryParams()
{
$this->getElementAttribs();
return $this->_jQueryParams;
}
/**
* Render an jQuery UI Widget element using its associated view helper
*
* @param string $content
* @return string
* @throws Zend_Form_Decorator_Exception if element or view are not registered
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('UiWidgetElement decorator cannot render without a registered view object');
}
if(method_exists($element, 'getJQueryParams')) {
$this->setJQueryParams($element->getJQueryParams());
}
$jQueryParams = $this->getJQueryParams();
$helper = $this->getHelper();
$separator = $this->getSeparator();
$value = $this->getValue($element);
$attribs = $this->getElementAttribs();
$name = $element->getFullyQualifiedName();
$id = $element->getId();
$attribs['id'] = $id;
$elementContent = $view->$helper($name, $value, $jQueryParams, $attribs);
switch ($this->getPlacement()) {
case self::APPEND:
return $content . $separator . $elementContent;
case self::PREPEND:
return $elementContent . $separator . $content;
default:
return $elementContent;
}
}
}PK DyH[��Ї� � UiWidgetContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UiWidgetContainer.php 20746 2010-01-29 10:36:35Z beberlei $
*/
require_once "Zend/Form/Decorator/Abstract.php";
/**
* Abstract Form Decorator for all jQuery UI Widget Containers
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class ZendX_JQuery_Form_Decorator_UiWidgetContainer extends Zend_Form_Decorator_Abstract
{
/**
* View helper
* @var string
*/
protected $_helper;
/**
* Element attributes
* @var array
*/
protected $_attribs;
/**
* jQuery option parameters
* @var array
*/
protected $_jQueryParams;
/**
* Get view helper for rendering container
*
* @return string
*/
public function getHelper()
{
if (null === $this->_helper) {
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('No view helper specified fo DijitContainer decorator');
}
return $this->_helper;
}
/**
* Get element attributes
*
* @return array
*/
public function getAttribs()
{
if (null === $this->_attribs) {
$attribs = $this->getElement()->getAttribs();
if (array_key_exists('jQueryParams', $attribs)) {
$this->getJQueryParams();
unset($attribs['jQueryParams']);
}
$this->_attribs = $attribs;
}
return $this->_attribs;
}
/**
* Get jQuery option parameters
*
* @return array
*/
public function getJQueryParams()
{
if (null === $this->_jQueryParams) {
$this->_jQueryParams = array();
if($attribs = $this->getElement()->getAttribs()) {
if (array_key_exists('jQueryParams', $attribs)) {
$this->_jQueryParams = $attribs['jQueryParams'];
}
}
if($options = $this->getOptions()) {
if (array_key_exists('jQueryParams', $options)) {
$this->_jQueryParams = array_merge($this->_jQueryParams, $options['jQueryParams']);
$this->removeOption('jQueryParams');
}
}
}
return $this->_jQueryParams;
}
/**
* Render an jQuery UI Widget element using its associated view helper
*
* Determine view helper from 'helper' option, or, if none set, from
* the element type. Then call as
* helper($element->getName(), $element->getValue(), $element->getAttribs())
*
* @param string $content
* @return string
* @throws Zend_Form_Decorator_Exception if element or view are not registered
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
return $content;
}
$jQueryParams = $this->getJQueryParams();
$attribs = $this->getOptions();
$helper = $this->getHelper();
$id = $element->getId() . '-container';
return $view->$helper($id, $jQueryParams, $attribs);
}
}PK DyH[���O O UiWidgetPane.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UiWidgetPane.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
require_once "Zend/Form/Decorator/Abstract.php";
/**
* Abstract Form Decorator for all jQuery UI Pane View Helpers
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class ZendX_JQuery_Form_Decorator_UiWidgetPane extends Zend_Form_Decorator_Abstract
{
/**
* View helper
* @var string
*/
protected $_helper;
/**
* Element attributes
* @var array
*/
protected $_attribs;
/**
* jQuery option parameters
* @var array
*/
protected $_jQueryParams;
/**
* Container title
* @var string
*/
protected $_title;
/**
* Get view helper for rendering container
*
* @return string
*/
public function getHelper()
{
if (null === $this->_helper) {
require_once 'Zend/Form/Decorator/Exception.php';
throw new Zend_Form_Decorator_Exception('No view helper specified fo UiWidgetContainer decorator');
}
return $this->_helper;
}
/**
* Get element attributes
*
* @return array
*/
public function getAttribs()
{
if (null === $this->_attribs) {
$attribs = $this->getElement()->getAttribs();
if (array_key_exists('jQueryParams', $attribs)) {
$this->getJQueryParams();
unset($attribs['jQueryParams']);
}
$this->_attribs = $attribs;
}
return $this->_attribs;
}
/**
* Get jQuery option parameters
*
* @return array
*/
public function getJQueryParams()
{
if (null === $this->_jQueryParams) {
$attribs = $this->getElement()->getAttribs();
$this->_jQueryParams = array();
if (array_key_exists('jQueryParams', $attribs)) {
$this->_jQueryParams = $attribs['jQueryParams'];
}
$options = $this->getOptions();
if (array_key_exists('jQueryParams', $options)) {
$this->_jQueryParams = array_merge($this->_jQueryParams, $options['jQueryParams']);
$this->removeOption('jQueryParams');
}
}
// Ensure we have a title param
if (!array_key_exists('title', $this->_jQueryParams)) {
require_once "Zend/Form/Decorator/Exception.php";
throw new Zend_Form_Decorator_Exception("UiWidgetPane Decorators have to have a jQueryParam 'title' to render. This title can been set via setJQueryParam('title') on the parent element.");
}
return $this->_jQueryParams;
}
/**
* Render an jQuery UI Widget Pane using its associated view helper
*
* @throws Zend_Form_Decorator_Exception
* @param string $content
* @return string
* @throws Zend_Form_Decorator_Exception if element or view are not registered
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
return $content;
}
$jQueryParams = $this->getJQueryParams();
$attribs = array_merge($this->getAttribs(), $this->getOptions());
if(isset($jQueryParams['title']) && !empty($jQueryParams['title'])) {
if (null !== ($translator = $element->getTranslator())) {
$jQueryParams['title'] = $translator->translate($jQueryParams['title']);
}
}
if(isset($jQueryParams['containerId'])) {
$id = $jQueryParams['containerId']."-container";
} else {
require_once "Zend/Form/Decorator/Exception.php";
throw new Zend_Form_Decorator_Exception("UiWidgetPane Decorators have to have a jQueryParam 'containerId', to point at their parent container. This containerId has been set via setAttrib('id') on the parent element.");
}
$helper = $this->getHelper();
return $view->$helper($id, $content, $jQueryParams, $attribs);
}
}PK DyH[2�v�� � TabPane.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TabPane.php 20165 2010-01-09 18:57:56Z bkarwin $
*/
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetContainer
*/
require_once "UiWidgetPane.php";
/**
* Form Decorator for jQuery Tab Pane View Helper
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_TabPane extends ZendX_JQuery_Form_Decorator_UiWidgetPane
{
protected $_helper = "tabPane";
}PK DyH[+�g� � DialogContainer.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category ZendX
* @package ZendX_JQuery
* @subpackage View
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DialogContainer.php 20746 2010-01-29 10:36:35Z beberlei $
*/
/**
* @see ZendX_JQuery_Form_Decorator_UiWidgetContainer
*/
require_once "UiWidgetContainer.php";
/**
* Form Decorator for jQuery Dialog View Helper
*
* @package ZendX_JQuery
* @subpackage Form
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZendX_JQuery_Form_Decorator_DialogContainer extends ZendX_JQuery_Form_Decorator_UiWidgetContainer
{
protected $_helper = "dialogContainer";
/**
* Render an jQuery UI Widget element using its associated view helper
*
* Determine view helper from 'helper' option, or, if none set, from
* the element type. Then call as
* helper($element->getName(), $element->getValue(), $element->getAttribs())
*
* @param string $content
* @return string
* @throws Zend_Form_Decorator_Exception if element or view are not registered
*/
public function render($content)
{
$element = $this->getElement();
$view = $element->getView();
if (null === $view) {
return $content;
}
$jQueryParams = $this->getJQueryParams();
$attribs = $this->getOptions();
$helper = $this->getHelper();
$id = $element->getId() . '-container';
return $view->$helper($id, $content, $jQueryParams, $attribs);
}
}PK dH[���c� �
DijitForm.phpnu &1i� PK dH[�B?^� � � DijitElement.phpnu &1i� PK dH[l��u u � SplitContainer.phpnu &1i� PK dH["غ� �$ DijitContainer.phpnu &1i� PK dH[)�z z �; BorderContainer.phpnu &1i� PK dH[�r$�( ( �A AccordionContainer.phpnu &1i� PK dH[�4�� &G AccordionPane.phpnu &1i� PK dH[J��sv v {L StackContainer.phpnu &1i� PK dH[��� 3R TabContainer.phpnu &1i� PK dH[��f f �W ContentPane.phpnu &1i� PK DyH[�<�( ( )] UiWidgetElementMarker.phpnu &1i� PK DyH[��g}� � �a UiWidgetElement.phpnu &1i� PK DyH[��Ї� � ^u UiWidgetContainer.phpnu &1i� PK DyH[���O O i� UiWidgetPane.phpnu &1i� PK DyH[2�v�� � �� TabPane.phpnu &1i� PK DyH[+�g� � /� DialogContainer.phpnu &1i� PK �