本文整理汇总了PHP中Zend_Dojo::enableView方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo::enableView方法的具体用法?PHP Zend_Dojo::enableView怎么用?PHP Zend_Dojo::enableView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Dojo
的用法示例。
在下文中一共展示了Zend_Dojo::enableView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initView
protected function _initView()
{
$this->bootstrap(array('request'));
// Initialize view
$view = new Zend_View();
$view->setEncoding('UTF-8');
$view->doctype('XHTML1_STRICT');
$view->headTitle()->setSeparator(' » ');
// Save the base URL
$view->baseUrl = $this->getResource('request')->getBaseUrl();
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
// Add some stylesheet
$view->headLink()->appendStylesheet($view->baseUrl . '/css/default.css');
// Set user info
/*
$session = $this->getResource('session');
$view->userLoggedIn = $session->logged_in;
$view->userInfo = $session->user;
*/
$view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'SimpleCal_View_Helper_');
Zend_Dojo::enableView($view);
// Return it, so that it can be stored by the bootstrap
return $view;
}
示例2: _initViewSettings
/**
* Setup the view
*/
protected function _initViewSettings()
{
$this->bootstrap('view');
$this->_view = $this->getResource('view');
// add global helpers
$this->_view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'Zend_View_Helper');
Zend_Dojo::enableView($this->_view);
//$this->_view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
// set encoding and doctype
$this->_view->setEncoding('koi8-r');
$this->_view->doctype('XHTML1_STRICT');
$config = $this->getResource('config');
$prefix = $config["urlprefix"];
// set css links and a special import for the accessibility styles
// $this->_view->headStyle()->setStyle('@import "/css/access.css";');
// $this->_view->headLink()->appendStylesheet('/reg2/css/reset.css');
$this->_view->headLink()->appendStylesheet($prefix . '/css/form.css');
$this->_view->headLink()->appendStylesheet($prefix . '/css/reg2.css');
// setting the site in the title
$this->_view->headTitle('ιώβ-10');
// setting a separator string for segments:
$this->_view->headTitle()->setSeparator(' - ');
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($this->_view);
return $this->_view;
}
示例3: _initView
protected function _initView()
{
$view = new Zend_View();
Zend_Dojo::enableView($view);
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->setView($view);
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
return $view;
}
示例4: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* @return void
*/
public function setUp()
{
$registry = Zend_Registry::getInstance();
if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
unset($registry['Zend_Dojo_View_Helper_Dojo']);
}
$this->view = new Zend_View();
Zend_Dojo::enableView($this->view);
}
示例5: init
/**
* I think this is needed for something. can't remember
*
*/
public function init()
{
Zend_Dojo::enableView($this->view);
$this->view->url = Zend_Registry::get('config')->site->url;
$this->view->action = $this->getRequest()->getActionName();
header('Content-Type: text/html; charset=ISO-8859-1');
$this->_db = Zend_Registry::get('db');
Bvb_Grid_Deploy_Ofc::$url = Zend_Registry::get('config')->site->url;
}
示例6: render
/**
* @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
*/
public function render()
{
Zend_Dojo::enableView($this->getView());
$this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.Select');
$this->setAttribute('dojoType', 'dijit.form.Select');
if (!$this->hasAttribute('style')) {
$this->setAttribute('style', 'width:120px !important;');
}
return $this->getView()->formSelect($this->getFieldName(), $this->getDefaultValue(), $this->getAttributes(), $this->getValues());
}
示例7: init
public function init()
{
parent::init();
$this->_flash = $this->_helper->getHelper('FlashMessenger');
$this->_redirector = $this->_helper->getHelper('Redirector');
$this->checkAuth();
$this->_identity = Zend_Auth::getInstance()->getIdentity();
Zend_Dojo::enableView($this->view);
//TODO there's gotta be a better way to do this
$this->_config = Zend_Registry::get('Config');
}
示例8: getDojo
/**
* Retrieve Dojo View Helper
*
* @return Zend_Dojo_View_Dojo_Container
*/
public function getDojo()
{
if (null === $this->_dojo) {
$this->getBootstrap()->bootstrap('view');
$view = $this->getBootstrap()->view;
Zend_Dojo::enableView($view);
$view->dojo()->setOptions($this->getOptions());
$this->_dojo = $view->dojo();
}
return $this->_dojo;
}
示例9: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* @return void
*/
public function setUp()
{
$registry = Zend_Registry::getInstance();
if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
unset($registry['Zend_Dojo_View_Helper_Dojo']);
}
Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
$view = new Zend_View();
Zend_Dojo::enableView($view);
$this->helper = new My_View_Helper_SimpleTextarea();
$this->helper->setView($view);
}
示例10: _initViewHelpers
protected function _initViewHelpers()
{
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('content-type', 'text/html:charset=utf-8')->appendName('description', 'ISKCON Congregation Database-Mumbai Chowpatty');
$view->headTitle('Radha Gopinath Mandir');
// Create new view object if not already instantiated
//$view = new Zend_View();
Zend_Dojo::enableView($view);
$view->dojo()->addStyleSheetModule('dijit.themes.tundra')->setDjConfigOption('usePlainJson', true)->disable();
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
}
示例11: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* @return void
*/
public function setUp()
{
$registry = Zend_Registry::getInstance();
if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
unset($registry['Zend_Dojo_View_Helper_Dojo']);
}
Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
$this->view = new Zend_View();
Zend_Dojo::enableView($this->view);
$this->view->addHelperPath('My/View/Helper/', 'My_View_Helper');
$this->element = new My_Form_Element_SimpleTextarea('foo');
$this->element->setView($this->view);
}
示例12: render
/**
* @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
*/
public function render()
{
$this->removeAttribute('id');
$this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('to')), 'to');
$this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('from')), 'from');
$this->setAttribute('dojoType', 'dijit.form.NumberTextBox');
Zend_Dojo::enableView($this->getView());
$this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.NumberTextBox');
if (!$this->hasAttribute('style')) {
$this->setAttribute('style', 'width:50px !important;');
}
return '<span>' . $this->__('From:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[from]', $this->getDefaultValue('from'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_from'))) . "<br><span>" . $this->__('To:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[to]', $this->getDefaultValue('to'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_to')));
}
示例13: setDojo
/**
* Set Dojo
*
* @return void
*/
public function setDojo()
{
Zend_Dojo::enableView($this->_view);
$options = array_change_key_case($this->getOptions(), CASE_LOWER);
foreach ($options as $key => $value) {
switch ($key) {
case 'cdnbase':
$this->_view->dojo()->setCdnBase($value);
break;
case 'cdndojopath':
$this->_view->dojo()->setCdnDojoPath($value);
break;
case 'cdnversion':
$this->_view->dojo()->setCdnVersion($value);
break;
case 'djconfig':
$this->_view->dojo()->setDjConfig($value);
break;
case 'layers':
foreach ($value as $path) {
$this->_view->dojo()->addLayer($path);
}
break;
case 'localpath':
$this->_view->dojo()->setLocalPath($value);
break;
case 'modules':
foreach ($value as $module) {
$this->_view->dojo()->requireModule($module);
}
break;
case 'stylesheets':
foreach ($value as $path) {
$this->_view->dojo()->addStylesheet($path);
}
break;
case 'stylesheetmodules':
foreach ($value as $module) {
$this->_view->dojo()->addStylesheetModule($module);
}
break;
default:
break;
}
}
if (array_key_exists('enable', $options) && $options['enable']) {
$this->_view->dojo()->enable();
} else {
$this->_view->dojo()->disable();
}
}
示例14: _initView
protected function _initView()
{
// Initialize view
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headTitle('My First Zend Framework Application');
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$viewRenderer->setView($view);
Zend_Dojo::enableView($view);
// Return it, so that it can be stored by the bootstrap
return $view;
}
示例15: render
/**
* @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
*/
public function render()
{
$this->removeAttribute('id');
$this->setAttribute('dojoType', 'dijit.form.DateTextBox');
$this->setAttribute('constraints', "{datePattern:'dd-MM-yyyy'}");
if ($this->getDefaultValue('from')) {
$this->setDefaultValue(date('Y-m-d', strtotime($this->getDefaultValue('from'))), 'from');
}
if ($this->getDefaultValue('to')) {
$this->setDefaultValue(date('Y-m-d', strtotime($this->getDefaultValue('to'))), 'to');
}
Zend_Dojo::enableView($this->getView());
$this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.DateTextBox');
if (!$this->hasAttribute('style')) {
$this->setAttribute('style', 'width:80px !important;');
}
return '<span>' . $this->__('From:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[from]', $this->getDefaultValue('from'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_from'))) . "<br><span>" . $this->__('To:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[to]', $this->getDefaultValue('to'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_to')));
}