本文整理汇总了PHP中Mage_Core_Block_Text::_beforeToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Text::_beforeToHtml方法的具体用法?PHP Mage_Core_Block_Text::_beforeToHtml怎么用?PHP Mage_Core_Block_Text::_beforeToHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Block_Text
的用法示例。
在下文中一共展示了Mage_Core_Block_Text::_beforeToHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _beforeToHtml
/**
* Generate the JS required to load the update routine
*
* @return $this
*/
protected function _beforeToHtml()
{
$current = str_replace('.', '_', Mage::helper('wordpress/system')->getExtensionVersion());
$text = implode('', array('<script type="text/javascript">', sprintf("var WP_VERSION_LATEST = '%s';", $latestVersion = Mage::app()->getCache()->load('wordpress_integration_update' . $current)), sprintf("var WP_VERSION_CURRENT = '%s';", Mage::helper('wordpress/system')->getExtensionVersion()), sprintf("var WP_VERSION_LOOKUP_URL = '%s';", $this->getUrl('adminhtml/wordpress/checkVersion')), 'new fishpig.WP.Update();', '</script>'));
$this->setText($text);
return parent::_beforeToHtml();
}
示例2: _beforeToHtml
/**
*
* @return
*/
protected function _beforeToHtml()
{
if ($this->getTemplate() === 'small.phtml') {
$this->_setTextForSmallTemplate();
} else {
if ($this->getTemplate() === 'large.phtml') {
$this->_setTextForLargeTemplate();
}
}
return parent::_beforeToHtml();
}
示例3: _beforeToHtml
/**
* Before rendering html, but after trying to load cache
*
* @return Mage_Core_Block_Abstract
*/
protected function _beforeToHtml()
{
$this->token++;
return parent::_beforeToHtml();
}
示例4: _beforeToHtml
/**
* Set the HTML output
*
* @return $this
*/
protected function _beforeToHtml()
{
$html = '<div id="%s">%s</div><script type="text/javascript">new Ajax.Updater("%s", "%s", {});</script>';
$this->setText(sprintf($html, $this->getId(), $this->_getLoader(), $this->getId(), $this->getAjaxUrl()));
return parent::_beforeToHtml();
}
示例5: _beforeToHtml
/**
* Generate the JS required to load the update routine
*
* @return $this
*/
protected function _beforeToHtml()
{
$this->setText(sprintf("<script type=\"text/javascript\">new fishpig.WP.Update('%s', '%s');</script>", $this->_getSourceUrl(), $this->_getVersion()));
return parent::_beforeToHtml();
}
示例6: _beforeToHtml
protected function _beforeToHtml()
{
$this->setText('You need the <a href="#">XML Sitemap</a> add-on.');
return parent::_beforeToHtml();
}