本文整理汇总了PHP中ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode方法的典型用法代码示例。如果您正苦于以下问题:PHP ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode方法的具体用法?PHP ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode怎么用?PHP ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZendX_JQuery_View_Helper_JQuery
的用法示例。
在下文中一共展示了ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
// Restore original autoloaders
$loaders = spl_autoload_functions();
foreach ($loaders as $loader) {
spl_autoload_unregister($loader);
}
foreach ($this->loaders as $loader) {
spl_autoload_register($loader);
}
// Reset autoloader instance so it doesn't affect other tests
Zend_Loader_Autoloader::resetInstance();
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
}
示例2: _parseOptions
/**
* Parse options to find those pertinent to jquery helper and invoke them
*
* @param array $options
* @return void
*/
protected function _parseOptions(array $options)
{
$options = array_merge($options, array('cdn_ssl' => false));
foreach ($options as $key => $value) {
switch($key) {
case 'noconflictmode':
if (!(bool)$value) {
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
} else {
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
}
break;
case 'version':
$this->_view->JQuery()->setVersion($value);
break;
case 'localpath':
$this->_view->JQuery()->setLocalPath($value);
break;
case 'uiversion':
case 'ui_version':
$this->_view->JQuery()->setUiVersion($value);
break;
case 'uilocalpath':
case 'ui_localpath':
$this->_view->JQuery()->setUiLocalPath($value);
break;
case 'cdn_ssl':
$this->_view->JQuery()->setCdnSsl($value);
break;
case 'render_mode':
case 'rendermode':
$this->_view->JQuery()->setRenderMode($value);
break;
case 'javascriptfile':
$this->_view->JQuery()->addJavascriptFile($value);
break;
case 'javascriptfiles':
foreach($options['javascriptfiles'] as $file) {
$this->_view->JQuery()->addJavascriptFile($file);
}
break;
case 'stylesheet':
$this->_view->JQuery()->addStylesheet($value);
break;
case 'stylesheets':
foreach ($value as $stylesheet) {
$this->_view->JQuery()->addStylesheet($stylesheet);
}
break;
}
}
if ((isset($options['uienable']) && (bool) $options['uienable'])
|| (isset($options['ui_enable']) && (bool) $options['ui_enable'])
|| (!isset($options['ui_enable']) && !isset($options['uienable'])))
{
$this->_view->JQuery()->uiEnable();
} else {
$this->_view->JQuery()->uiDisable();
}
}
示例3: tearDown
public function tearDown()
{
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
}
示例4: testNoConflictModeIsRecognizedInRenderingOnLoadStackEvent
/**
* @group ZF-5344
*/
public function testNoConflictModeIsRecognizedInRenderingOnLoadStackEvent()
{
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
$this->jquery->addOnLoad("foo");
$this->jquery->addOnLoad("bar");
$this->jquery->enable();
$jQueryStack = $this->jquery->__toString();
$this->assertContains('$j(document).ready(function()', $jQueryStack);
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
$jQueryStack = $this->jquery->__toString();
$this->assertNotContains('$j(document).ready(function()', $jQueryStack);
}