本文整理匯總了PHP中Varien_Data_Form_Element_Abstract::getLegend方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form_Element_Abstract::getLegend方法的具體用法?PHP Varien_Data_Form_Element_Abstract::getLegend怎麽用?PHP Varien_Data_Form_Element_Abstract::getLegend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Varien_Data_Form_Element_Abstract
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Abstract::getLegend方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _getHeaderHtml
/**
* Enter description here...
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderHtml($element)
{
$default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
$html = '<div class="entry-edit-head collapseable" ><a id="' . $element->getHtmlId() . '-head" href="#" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\'); return false;">' . $element->getLegend() . '</a></div>';
$html .= '<fieldset class="config collapseable" id="' . $element->getHtmlId() . '">';
$html .= '<legend>' . $element->getLegend() . '</legend>';
// field label column
$html .= '<table cellspacing="0" class="form-list"><colgroup class="label"/><colgroup class="value"/>';
if (!$default) {
$html .= '<colgroup class="default"/>';
}
$html .= '<tbody>';
return $html;
}
示例2: 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_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : ''));
return $this->toHtml();
}
示例3: 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();
}
示例4: _getHeaderTitleHtml
/**
* Return header title part of html for payment solution
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderTitleHtml($element)
{
$html = '<div class="entry-edit-head collapseable" ><a id="' . $element->getHtmlId() . '-head" href="#" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;">';
$html .= ' <img src="' . $this->getSkinUrl('images/adyen/logo.png') . '" height="20" style="vertical-align: text-bottom; margin-right: 5px;"/> ';
$html .= $element->getLegend();
if ($this->_isPaymentEnabled($element)) {
$html .= ' <img src="' . $this->getSkinUrl('images/icon-enabled.png') . '" style="vertical-align: middle"/> ';
}
$html .= '</a></div>';
return $html;
}
示例5: render
/**
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$helper = $this->_getHelper();
if (!$helper->validApiToken()) {
// Route to API token
$url = $helper->getScopeUrl('*/system_config/edit', array('section' => 'bronto'));
$element->setComment("In order to receive <strong>{$element->getLegend()}</strong>, you must enter a valid <a href=\"{$url}\">API Token</a>.");
} else {
foreach ($this->_pullRssItems() as $rssItem) {
$this->addItemToFieldset($element, $rssItem)->setRenderer($this->_getRenderer());
}
}
return parent::render($element);
}
示例6: _getHeaderHtml
/**
* Return header html for fieldset
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderHtml($element)
{
$default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
$html = '<div class="entry-edit-head collapseable" ><a id="' . $element->getHtmlId() . '-head" href="#" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a></div>';
$html .= '<input id="' . $element->getHtmlId() . '-state" name="config_state[' . $element->getId() . ']" type="hidden" value="' . (int) $this->_getCollapseState($element) . '" />';
$html .= '<fieldset class="' . $this->_getFieldsetCss() . '" id="' . $element->getHtmlId() . '">';
$html .= '<legend>' . $element->getLegend() . '</legend>';
if ($element->getComment()) {
$html .= '<div class="comment">' . $element->getComment() . '</div>';
}
// field label column
$html .= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
if (!$default) {
$html .= '<colgroup class="use-default" />';
}
$html .= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
return $html;
}
示例7: _getHeaderTitleHtml
/**
* Return header title part of html for payment solution
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderTitleHtml($element)
{
$html = '<div class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
$groupConfig = $this->getGroup($element)->asArray();
if (!empty($groupConfig['learn_more_link'])) {
$html .= '<a class="link-more" href="' . $groupConfig['learn_more_link'] . '" target="_blank">' . $this->__('Learn More') . '</a>';
}
if (!empty($groupConfig['demo_link'])) {
$html .= '<a class="link-demo" href="' . $groupConfig['demo_link'] . '" target="_blank">' . $this->__('View Demo') . '</a>';
}
$html .= '</strong>';
if ($element->getComment()) {
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
}
$html .= '</div>';
$html .= '<div class="button-container"><button type="button"' . ($this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"') . ' class="button' . (empty($groupConfig['paypal_ec_separate']) ? '' : ' paypal-ec-separate') . ($this->_isPaymentEnabled($element) ? '' : ' disabled') . '" id="' . $element->getHtmlId() . '-head" onclick="paypalToggleSolution.call(this, \'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . $this->__('Configure') . '</span><span class="state-opened">' . $this->__('Close') . '</span></button></div></div>';
return $html;
}
示例8: render
/**
* If all conditions described in <conditions> section of the group description are TRUE - render as it was
* specified as <frontend_type>text</frontend_type>. Otherwise don't render anything.
*
* @param Varien_Data_Form_Element_Abstract $fieldset
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $fieldset)
{
$this->_currentGroupName = $fieldset->getLegend();
$group = $this->getGroup();
$doRender = !empty($group) && isset($group->conditions);
if ($doRender) {
foreach ($group->conditions as $conditionLabels) {
/* @var $conditionLabels Mage_Core_Model_Config_Element */
$xpath = '';
$shouldBeEmpty = null;
$value = '';
foreach ($conditionLabels as $condition) {
foreach ($condition as $conditionElement) {
/* @var $conditionElement Mage_Core_Model_Config_Element */
switch ($conditionElement->getName()) {
case 'xpath':
$xpath = (string) $conditionElement;
break;
case 'empty':
$shouldBeEmpty = true;
break;
case 'non_empty':
$shouldBeEmpty = false;
break;
case 'value':
$value = (string) $conditionElement;
break;
}
}
$node = Mage::app()->getConfig()->getNode($xpath);
if ($shouldBeEmpty !== null) {
$doRender = $shouldBeEmpty ? empty($node) : !empty($node);
} else {
$doRender = (string) $node == $value;
}
if (!$doRender) {
break;
}
}
}
}
return $doRender ? parent::render($fieldset) : '';
}
示例9: _getHeaderTitleHtml
/**
* Return header title part of html for payment solution
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderTitleHtml($element)
{
$html = '<div class="config-heading" style="display:block; clear:both; content:"."; font-size:0; line-height:0; height:0; overflow:hidden;" ><div class="heading" style="padding-left:56px; background:url(' . $this->getSkinUrl('images/paypalmx/logo-paypal.png') . ') no-repeat 0 2px;"><strong>' . $element->getLegend();
$groupConfig = $this->getGroup($element)->asArray();
if (!empty($groupConfig['learn_more_link'])) {
$html .= '<a class="link-more" href="' . $groupConfig['learn_more_link'] . '" target="_blank">' . $this->__('Aprende más') . '</a>';
}
if (!empty($groupConfig['demo_link'])) {
$html .= '<a class="link-demo" href="' . $groupConfig['demo_link'] . '" target="_blank">' . $this->__('Vér Demo') . '</a>';
}
$html .= '</strong>';
if ($element->getComment()) {
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
}
$html .= '</div>';
$html .= '<div class="button-containermx" style="float:right; padding:0 0 0 0; ">
<img src="' . $this->getSkinUrl('images/paypalmx/accpmark_mensualidades_SP.PNG') . '" width="160px" height="30px">
<img src="' . $this->getSkinUrl('images/paypalmx/accpmark_tarjdeb_SP.PNG') . '" width="160px" height="30px" style=" padding: 0 0 0 5px;">
<img src="' . $this->getSkinUrl('images/paypalmx/accpmark_visa_mc_SP.PNG') . '" width="75px" height="30px" style=" margin: 0 10px 0 5px; ">
<button type="button"' . ($this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"') . ' class="button' . (empty($groupConfig['paypal_ec_separate']) ? '' : ' paypal-ec-separate') . ($this->_isPaymentEnabled($element) ? '' : ' disabled') . '" id="' . $element->getHtmlId() . '-head" onclick="paypalToggleSolution.call(this, \'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . $this->__('Configurar') . '</span><span class="state-opened">' . $this->__('Cerrar') . '</span></button></div></div>';
return $html;
}
示例10: _getHeaderTitleHtml
/**
* Return header title part of html for fieldset
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderTitleHtml($element)
{
return '<div class="entry-edit-head collapseable" ><a id="' . $element->getHtmlId() . '-head" href="#" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a></div>';
}
示例11: _getHeaderTitleHtml
/**
* Return header title part of html for payment solution
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getHeaderTitleHtml($element)
{
$html = '<div id="cosmocommerce_modules" class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
$groupConfig = $this->getGroup($element)->asArray();
if (!empty($groupConfig['learn_more_link'])) {
$html .= '<a class="link-more" href="' . $groupConfig['learn_more_link'] . '" target="_blank">' . $this->__('Learn More') . '</a>';
}
if (!empty($groupConfig['demo_link'])) {
$html .= '<a class="link-demo" href="' . $groupConfig['demo_link'] . '" target="_blank">' . $this->__('View Demo') . '</a>';
}
$html .= '</strong>';
if ($element->getComment()) {
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
}
$html .= '</div>';
if ($this->_isEnabled($element)) {
$html .= '<div class="button-container"><button type="button"><span class="state-closed">' . $this->__('模塊環境正常') . '</span></button></div></div>';
//$version=Mage::getSingleton('adminhtml/config')->getSection('cosmocommerce')->modules->user;
$user = Mage::getStoreConfig('cosmocommerce/required_settings/user');
$pwd = Mage::getStoreConfig('cosmocommerce/required_settings/pwd');
//print_r(Mage::getSingleton('adminhtml/config')->getSection('cosmocommerce')->groups->modules->fields->required_settings->fields->user->value);
$html .= '
<script type="text/javascript">
//<![CDATA[
function redirectToUpdate()
{
var url = "' . Mage::getSingleton("adminhtml/url")->getUrl("*/updates/update") . '"+"?repo="+this.value;
if (confirm("模塊將會更新代碼.")) {
if (Prototype.Browser.IE) {
var generateLink = new Element("a", {href: url});
$$("body")[0].insert(generateLink);
generateLink.click();
} else {
window.location.href = url;
}
}
}
function redirectToUpdatef()
{
var url = "' . Mage::getSingleton("adminhtml/url")->getUrl("*/updates/updatef") . '"+"?repo="+this.value;
if (confirm("模塊將會強製覆蓋代碼.")) {
if (Prototype.Browser.IE) {
var generateLink = new Element("a", {href: url});
$$("body")[0].insert(generateLink);
generateLink.click();
} else {
window.location.href = url;
}
}
}
function redirectToCommit()
{
var url = "' . Mage::getSingleton("adminhtml/url")->getUrl("*/updates/commit") . '"+"?repo="+this.value;
var note = prompt("請輸入記錄這次版本的備注");
url=url+"¬e="+note;
if (confirm("模塊更新將會進行提交.")) {
if (Prototype.Browser.IE) {
var generateLink = new Element("a", {href: url});
$$("body")[0].insert(generateLink);
generateLink.click();
} else {
window.location.href = url;
}
}
}
function disableGenerateButton(id)
{
var elem = $(id);
elem.disabled = true;
elem.addClassName("disabled");
}
$("cosmocommerce_modules").select("input").each(function(elem) {
Event.observe($(elem.id), "change", disableGenerateButton(elem.id));
});
//]]>
</script>';
$base_path = Mage::getBaseDir('base');
$modman_path = Mage::getBaseDir('base') . DS . '.modman';
return $html;
$html .= "<ul style='font-size: 11px;padding:10px;'>";
foreach (glob($modman_path . "/*", GLOB_ONLYDIR) as $_subfolder) {
$repo = new Git2\Repository($_subfolder);
$foldername = basename($_subfolder);
//print_r($repo);
$ref = Git2\Reference::lookup($repo, "refs/heads/master");
//print_r(get_class_methods(new Git2\Repository($_subfolder)));
//print_r(get_class_vars('Git2\Repository'));
//print_r(get_object_vars($repo));
//print_r($ref);
//echo $ref->getName() . PHP_EOL;
$version = $ref->getTarget();
//.........這裏部分代碼省略.........
示例12: render
/**
* Render fieldset html
*
* @param Varien_Data_Form_Element_Abstract $fieldset
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $fieldset)
{
$this->addData(array('fieldset_label' => $fieldset->getLegend()));
return $this->toHtml();
}