本文整理汇总了PHP中Varien_Data_Form_Element_Abstract::getOriginalData方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Abstract::getOriginalData方法的具体用法?PHP Varien_Data_Form_Element_Abstract::getOriginalData怎么用?PHP Varien_Data_Form_Element_Abstract::getOriginalData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Abstract
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Abstract::getOriginalData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render element html
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$imageDirectoryBaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'infortis/system/css/images';
$elementData = $element->getOriginalData();
$url1 = $this->getUrl('dataporter/adminhtml_cfgporter/index/action_type/import/package/Infortis_Ultimo');
$url2 = $this->getUrl('dataporter/adminhtml_cfgporter/index/action_type/export/package/Infortis_Ultimo');
//Start base HTML
$html = '';
$html .= sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4></td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
//Open row
$html .= sprintf('<tr class="" id="row_%s_content">', $element->getHtmlId());
//Add label cell
$html .= sprintf('<td class="label"><label>%s</label></td>', $elementData['sublabel']);
//Open main cell
$html .= '<td class="value">';
//Buttons
$html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('go-to-page')->setLabel('Import')->setOnClick("setLocation('{$url1}')")->toHtml();
$html .= ' ';
$html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('go-to-page')->setLabel('Export')->setOnClick("setLocation('{$url2}')")->toHtml();
//Close all wrappers: cell and row
$html .= '</td>';
$html .= '</tr>';
//Add CSS
$html .= '<style>
button.go-to-page span {
background-repeat: no-repeat;
background-position: 100% 50%;
background-image: url(' . $imageDirectoryBaseUrl . '/btn-go-to-page-icon.png);
padding-right: 26px;
}
</style>';
return $html;
}
示例2: _getElementHtml
/**
* Get the button and scripts contents
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$originalData = $element->getOriginalData();
$elementHtmlId = $element->getHtmlId();
$this->addData(array_merge($this->_getButtonData($elementHtmlId, $originalData), $this->_getSandboxButtonData($elementHtmlId, $originalData)));
return $this->_toHtml();
}
示例3: render
/**
* Render fieldset html
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$elementOriginalData = $element->getOriginalData();
if (isset($elementOriginalData['help_link'])) {
$this->setHelpLink($elementOriginalData['help_link']);
}
$js = '
sisowToggleSolution = function(id, url) {
var doScroll = false;
Fieldset.toggleCollapse(id, url);
if ($(this).hasClassName("open")) {
$$(".with-button button.button").each(function(anotherButton) {
if (anotherButton != this && $(anotherButton).hasClassName("open")) {
$(anotherButton).click();
doScroll = true;
}
}.bind(this));
}
if (doScroll) {
var pos = Element.cumulativeOffset($(this));
window.scrollTo(pos[0], pos[1] - 45);
}
}
';
return $this->toHtml() . $this->helper('adminhtml/js')->getScript($js);
}
示例4: _getElementHtml
/**
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$originalData = $element->getOriginalData();
$this->setData('rapidcampaign_link_href', $originalData['href']);
$this->setData('rapidcampaign_link_value', $originalData['value']);
return $this->toHtml();
}
示例5: _getElementHtml
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $el)
{
$data = $el->getOriginalData();
if (isset($data['process'])) {
$process = $data['process'];
} else {
return '<div>Action was not specified</div>';
}
if (isset($data['demo'])) {
$demo = $data['demo'];
} else {
return '<div>Demo param was not specified</div>';
}
$buttonSuffix = '';
if (isset($data['label'])) {
$buttonSuffix = ' ' . $data['label'];
}
$url = $this->getUrl('adminhtml/porto_demo/' . $process) . 'demoversion/' . $demo;
if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) {
$url .= "/website/" . $code;
}
if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) {
$url .= "/store/" . $code;
}
$html = $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('import-cms')->setLabel('Import' . $buttonSuffix)->setOnClick("setLocation('{$url}')")->toHtml();
return $html;
}
示例6: _getElementHtml
/**
* Get the button and scripts contents
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$originalData = $element->getOriginalData();
$buttonLabel = isset($originalData['button_label']) ? $originalData['button_label'] : 'Manual Sync';
$this->addData(array('button_label' => Mage::helper('customer')->__($buttonLabel), 'html_id' => $element->getHtmlId(), 'ajax_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/newsletter_system_config_synchronization/manualsync')));
return $this->_toHtml();
}
示例7: render
/**
* Render element html
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$origData = $element->getOriginalData();
$html = sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4>%s</td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel(), isset($origData['note']) ? '<div style="margin-top:10px">' . $origData['note'] . '</div>' : '');
if ($element->getComment()) {
$html .= '<p class="note"><span>' . $element->getComment() . '</span></p>';
}
return $html;
}
示例8: _getElementHtml
/**
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$originalData = $element->getOriginalData();
$logoFilename = Mage::getDesign()->getFilename('images' . DS . 'rapidcampaign' . DS . 'rapidcampaign_logo.svg', array('_type' => 'skin'));
if (file_exists($logoFilename)) {
$this->setData('rapidcampaign_img_src', $this->getSkinUrl('images' . DS . 'rapidcampaign' . DS . 'rapidcampaign_logo.svg'));
}
$this->setData('rapidcampaign_img_alt', $originalData['img_alt']);
return $this->toHtml();
}
示例9: _getElementHtml
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
// TODO: Check if the translation used here is actually superfluous
$data = $element->getOriginalData();
$path = $data['destination'];
$label = $data['value'];
$url = Mage::helper('zendesk')->getUrl('raw', $path);
$this->addData(array('label' => $label, 'link_url' => $url));
return $this->_toHtml();
}
示例10: render
/**
* Render fieldset html
*
* @param Varien_Data_Form_Element_Abstract $fieldset
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $fieldset)
{
foreach ($fieldset->getSortedElements() as $element) {
$htmlId = $element->getHtmlId();
$this->_elements[$htmlId] = $element;
}
$originalData = $fieldset->getOriginalData();
$this->addData(array('fieldset_label' => $fieldset->getLegend(), 'fieldset_admin_label' => isset($originalData['admin_label']) ? $originalData['admin_label'] : '', 'fieldset_backend_url' => Mage::getModel('intraship/config')->getBackendUrl(), 'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '', 'fieldset_doc_url' => isset($originalData['doc_url']) ? $originalData['doc_url'] : '', 'fieldset_onlineretoure_doc_url' => isset($originalData['onlineretoure_doc_url']) ? $originalData['onlineretoure_doc_url'] : '', 'fieldset_partner_url' => isset($originalData['partner_url']) ? $originalData['partner_url'] : ''));
return $this->toHtml();
}
示例11: render
public function render(Varien_Data_Form_Element_Abstract $fieldset)
{
foreach ($fieldset->getSortedElements() as $element) {
$htmlId = $element->getHtmlId();
$this->_elements[$htmlId] = $element;
}
$originalData = $fieldset->getOriginalData();
$this->addData(array('iframe_url' => isset($originalData['iframe_url']) ? $originalData['iframe_url'] : ''));
return $this->toHtml();
}
示例12: _getElementHtml
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$elementOriginalData = $element->getOriginalData();
$buttonSuffix = '';
if (isset($elementOriginalData['label'])) {
$buttonSuffix = ' ' . $elementOriginalData['label'];
}
$url = $this->getUrl('dgtyaris/adminhtml_restore/restore');
$html = $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('scalable restore')->setLabel($buttonSuffix)->setOnClick("setLocation('{$url}')")->toHtml();
return $html;
}
示例13: _getElementHtml
/**
* Import static blocks
*
* @param Varien_Data_Form_Element_Abstract $element
* @return String
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$elementOriginalData = $element->getOriginalData();
if (isset($elementOriginalData['label'])) {
$buttonLabel = $elementOriginalData['label'];
} else {
return '<div>Button label was not specified</div>';
}
$url = Mage::helper('adminhtml')->getUrl('apptrian_imageoptimizer/adminhtml_optimizer/optimize');
$html = $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('apptrian-imageoptimizer-admin-button-optimize')->setLabel($buttonLabel)->setOnClick("setLocation('{$url}')")->toHtml();
return $html;
}
示例14: render
/**
* Render fieldset html
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$elementOriginalData = $element->getOriginalData();
if (isset($elementOriginalData['help_link'])) {
$this->setHelpLink($elementOriginalData['help_link']);
}
$js = '
paypalToggleSolution = function(id, url) {
var doScroll = false;
Fieldset.toggleCollapse(id, url);
if ($(this).hasClassName("open")) {
$$(".with-button button.button").each(function(anotherButton) {
if (anotherButton != this && $(anotherButton).hasClassName("open")) {
$(anotherButton).click();
doScroll = true;
}
}.bind(this));
}
if (doScroll) {
var pos = Element.cumulativeOffset($(this));
window.scrollTo(pos[0], pos[1] - 45);
}
}
togglePaypalSolutionConfigureButton = function(button, enable) {
var $button = $(button);
$button.disabled = !enable;
if ($button.hasClassName("disabled") && enable) {
$button.removeClassName("disabled");
} else if (!$button.hasClassName("disabled") && !enable) {
$button.addClassName("disabled");
}
}
// check store-view disabling Express Checkout
document.observe("dom:loaded", function() {
var ecButton = $$(".pp-method-express button.button")[0];
var ecEnabler = $$(".paypal-ec-enabler")[0];
if (typeof ecButton == "undefined" || typeof ecEnabler != "undefined") {
return;
}
var $ecButton = $(ecButton);
$$(".with-button button.button").each(function(configureButton) {
if (configureButton != ecButton && !configureButton.disabled
&& !$(configureButton).hasClassName("paypal-ec-separate")
) {
togglePaypalSolutionConfigureButton(ecButton, false);
}
});
});
';
return $this->toHtml() . $this->helper('adminhtml/js')->getScript($js);
}
示例15: _getElementHtml
/**
* Get the button and scripts contents
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$originalData = $element->getOriginalData();
$label = $originalData['button_label'];
//Check if api key works
$ping = Mage::getModel('monkey/api');
$ping->ping();
if (!$ping->errorCode) {
$label = "Change API credentials";
}
$this->addData(array('button_label' => $this->helper('monkey')->__($label), 'button_url' => $this->helper('monkey/oauth2')->authorizeRequestUrl(), 'html_id' => $element->getHtmlId()));
return $this->_toHtml();
}