本文整理匯總了PHP中Varien_Data_Form_Element_Abstract::getRule方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form_Element_Abstract::getRule方法的具體用法?PHP Varien_Data_Form_Element_Abstract::getRule怎麽用?PHP Varien_Data_Form_Element_Abstract::getRule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Varien_Data_Form_Element_Abstract
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Abstract::getRule方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
if ($element->getRule() && $element->getRule()->getActions()) {
return $element->getRule()->getActions()->asHtmlRecursive();
}
return '';
}
示例2: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
$sHtml = '';
$sHtml .= '
<tr>
<td class="label"><label for="rule_aitloyalty_customer_display_title">' . Mage::helper('salesrule')->__('Please describe the rule conditions') . '</label></td>
<td class="value" colspan="2">
<div class="box" id="aitloyalty_customer_display_title" style="overflow:visible;">
<div class="hor-scroll" style="overflow:visible;">
<table class="dynamic-grid" cellspacing="0" id="attribute-labels-table">
<tr>';
$bFirst = true;
foreach ($this->getStores() as $_store) {
if ($_store->getId()) {
$sHtml .= '<th>' . $_store->getName();
if ($bFirst) {
$bFirst = false;
$sHtml .= '<span class="required">*</span>';
}
$sHtml .= '</th>';
}
}
$sHtml .= '</tr><tr>';
$_titles = $this->getTitleValues($element->getRule());
$bFirst = true;
foreach ($this->getStores() as $_store) {
if ($_store->getId()) {
if ($bFirst) {
$sRequired = ' required-entry';
$bFirst = false;
} else {
$sRequired = '';
}
// $sHtml .= '<td><input class="input-text ' . $sRequired . '" type="text" id="aitloyalty_customer_display_titles_' . $_store->getId() . '" name="aitloyalty_customer_display_titles[' . $_store->getId() . ']" value="' . $_titles[$_store->getId()] . '" /></td>';
$sHtml .= '<td><textarea class="input-text ' . $sRequired . '" id="aitloyalty_customer_display_titles_' . $_store->getId() . '" name="aitloyalty_customer_display_titles[' . $_store->getId() . ']" >' . $_titles[$_store->getId()] . '</textarea>';
}
}
$sHtml .= '</tr></table></div></div></td></tr>';
return $sHtml;
}