File indexing completed on 2024-12-29 05:27:35
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Dojo 0017 * @subpackage View 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** Zend_Dojo_View_Helper_DijitContainer */ 0024 // require_once 'Zend/Dojo/View/Helper/DijitContainer.php'; 0025 0026 /** 0027 * Dojo BorderContainer dijit 0028 * 0029 * @uses Zend_Dojo_View_Helper_DijitContainer 0030 * @package Zend_Dojo 0031 * @subpackage View 0032 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0033 * @license http://framework.zend.com/license/new-bsd New BSD License 0034 */ 0035 class Zend_Dojo_View_Helper_BorderContainer extends Zend_Dojo_View_Helper_DijitContainer 0036 { 0037 /** 0038 * Dijit being used 0039 * @var string 0040 */ 0041 protected $_dijit = 'dijit.layout.BorderContainer'; 0042 0043 /** 0044 * Dojo module to use 0045 * @var string 0046 */ 0047 protected $_module = 'dijit.layout.BorderContainer'; 0048 0049 /** 0050 * Ensure style is only registered once 0051 * @var bool 0052 */ 0053 protected $_styleIsRegistered = false; 0054 0055 /** 0056 * dijit.layout.BorderContainer 0057 * 0058 * @param string $id 0059 * @param string $content 0060 * @param array $params Parameters to use for dijit creation 0061 * @param array $attribs HTML attributes 0062 * @return string 0063 */ 0064 public function borderContainer($id = null, $content = '', array $params = array(), array $attribs = array()) 0065 { 0066 if (0 === func_num_args()) { 0067 return $this; 0068 } 0069 0070 // this will ensure that the border container is viewable: 0071 if (!$this->_styleIsRegistered) { 0072 $this->view->headStyle()->appendStyle('html, body { height: 100%; width: 100%; margin: 0; padding: 0; }'); 0073 $this->_styleIsRegistered = true; 0074 } 0075 0076 // and now we create it: 0077 return $this->_createLayoutContainer($id, $content, $params, $attribs); 0078 } 0079 }