本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout怎么用?PHP Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Widget_Form_Container
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
public function _prepareLayout()
{
parent::_prepareLayout();
$head = $this->getLayout()->getBlock('head');
$sliders = Mage::registry('sliders');
$slides = Mage::registry('slides');
$backUrl = $this->getUrl('*/*/edit', array('id' => $sliders->getId(), 'activeTab' => 'slides_section'));
$deleteUrl = $this->getUrl('*/*/deleteSlide', array('id' => $slides->getId(), 'sid' => $sliders->getId()));
$this->updateButton('delete', 'onclick', "setLocation('{$deleteUrl}');");
$this->updateButton('save', 'onclick', 'DnmSl.save();');
$this->updateButton('back', 'onclick', 'setLocation(\'' . $backUrl . '\');');
$this->_addButton('sac', array('label' => Mage::helper('dynamicslideshow')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => "DnmSl.save(true);"));
if ($sliders->getId()) {
if ($sliders->getData('load_googlefont') == 'yes') {
$fonts = $sliders->getData('google_font');
if (is_array($fonts)) {
foreach ($fonts as $font) {
$href = Mage::helper('dynamicslideshow')->getCssHref($font);
$head->addLinkRel('stylesheet', $href);
}
}
}
}
return $this;
}
示例2: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
}
}
示例3: _prepareLayout
protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller && $this->_mode) {
$this->setChild('form', $this->getLayout()->createBlock('pws_faq/adminhtml_faq_articles_edit_form'));
}
return parent::_prepareLayout();
}
示例4: _prepareLayout
/**
* Prepare layout
*
* @return mixed
*/
protected function _prepareLayout()
{
$this->setChild('form', $this->getLayout()->createBlock('magemonitoring/tab_form'));
$tabList = $this->getLayout()->createBlock('magemonitoring/tab_list', 'magemonitoring_tabs');
$this->getLayout()->getBlock('left')->append($tabList);
return parent::_prepareLayout();
}
示例5: _prepareLayout
/**
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
/* @var Open_Gallery_Model_Item $item */
$item = Mage::registry('item');
$this->_formScripts = $item->getHelper()->prepareEditFormScripts($item, $this->_formScripts);
return parent::_prepareLayout();
}
示例6: _prepareLayout
public function _prepareLayout()
{
parent::_prepareLayout();
$head = $this->getLayout()->getBlock('head');
$slider = Mage::registry('revslider');
$slide = Mage::registry('revslide');
$backUrl = $this->getUrl('*/*/edit', array('id' => $slider->getId(), 'activeTab' => 'slide_section'));
$deleteUrl = $this->getUrl('*/*/deleteSlide', array('id' => $slide->getId(), 'sid' => $slider->getId()));
$this->updateButton('delete', 'onclick', "setLocation('{$deleteUrl}');");
$this->updateButton('save', 'onclick', 'revLayer.save();');
$this->updateButton('back', 'onclick', 'setLocation(\'' . $backUrl . '\');');
$this->_addButton('sac', array('label' => Mage::helper('revslider')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => "revLayer.save(true);"));
if (version_compare(Mage::getVersion(), '1.7.0.0') < 0) {
$head->addJs('am/extensions/prototype/dragdrop.js');
}
if ($slider->getId()) {
if ($slider->getData('load_googlefont') == 'true') {
$fonts = $slider->getData('google_font');
if (is_array($fonts)) {
foreach ($fonts as $font) {
$href = Mage::helper('revslider')->getCssHref($font);
$head->addLinkRel('stylesheet', $href);
}
}
}
}
return $this;
}
示例7: _prepareLayout
protected function _prepareLayout()
{
if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) && Mage::helper('googleoptimizer')->isOptimizerActive(Mage::app()->getStore()->getStoreId())) {
$this->setChild('googleoptimizer_js', $this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml'));
}
return parent::_prepareLayout();
}
示例8: _prepareLayout
protected function _prepareLayout()
{
if (!Mage::registry('current_customer')->isReadonly()) {
$this->_addButton('save_and_continue', array('label' => Mage::helper('customer')->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
}
return parent::_prepareLayout();
}
示例9: _prepareLayout
protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller && $this->_mode) {
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_form'));
}
return parent::_prepareLayout();
}
示例10: _prepareLayout
/**
* Set the custom form block
*
* @return $this
*/
protected function _prepareLayout()
{
// Allows a custom child form block
$this->_mode = false;
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_form'));
return parent::_prepareLayout();
}
示例11: _prepareLayout
/**
* Prepare catalog event form or category selector
*
* @return Enterprise_CatalogEvent_Block_Adminhtml_Event_Edit
*/
protected function _prepareLayout()
{
if (!$this->getEvent()->getId() && !$this->getEvent()->getCategoryId()) {
$this->_removeButton('save');
$this->_removeButton('reset');
} else {
$this->_addButton('save_and_continue', array('label' => $this->helper('enterprise_catalogevent')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => 'saveAndContinue()'), 1);
$this->_formScripts[] = '
function saveAndContinue() {
if (editForm.validator.validate()) {
$(editForm.formId).insert({bottom:
\'<\' + \'input type="hidden" name="_continue" value="1" /\' + \'>\'
});
editForm.submit();
}
}
';
}
parent::_prepareLayout();
if (!$this->getEvent()->getId() && !$this->getEvent()->getCategoryId()) {
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_category'));
}
if ($this->getRequest()->getParam('category')) {
$this->_updateButton('back', 'label', $this->helper('enterprise_catalogevent')->__('Back to Category'));
}
if ($this->getEvent()->isReadonly() && $this->getEvent()->getImageReadonly()) {
$this->_removeButton('save');
$this->_removeButton('reset');
$this->_removeButton('save_and_continue');
}
if (!$this->getEvent()->isDeleteable()) {
$this->_removeButton('delete');
}
return $this;
}
示例12: _prepareLayout
protected function _prepareLayout()
{
if ($this->_getStatus()->status_key) {
$this->_removeButton("delete");
}
parent::_prepareLayout();
}
示例13: _prepareLayout
protected function _prepareLayout()
{
// return false;
$this->_addButton('save_and_continue', array('label' => $this->__('Save And Continue Edit'), 'onclick' => 'editForm.submit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
$this->_addButton('parse', array('label' => $this->__('Parse'), 'onclick' => "setLocation('{$this->getUrl('*/*/parse', array('_current' => true))}')"), 10);
return parent::_prepareLayout();
}
示例14: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
// add scripts
$js = $this->getLayout()->createBlock('core/template', 'webforms_js', array('template' => 'webforms/js.phtml', 'tabs_block' => 'webforms_fields_tabs'));
$this->getLayout()->getBlock('content')->append($js);
}
示例15: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('form', $this->getLayout()->createBlock('cores/Adminhtml_Cadastro_Form'));
Mage::app()->getLayout()->getBlock('head')->addJs('cores/spectrum.js');
Mage::app()->getLayout()->getBlock('head')->addItem('skin_css', 'images/cores/spectrum.css');
return parent::_prepareLayout();
}