本文整理汇总了PHP中Varien_Data_Form_Element_Fieldset::toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Fieldset::toHtml方法的具体用法?PHP Varien_Data_Form_Element_Fieldset::toHtml怎么用?PHP Varien_Data_Form_Element_Fieldset::toHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Fieldset
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Fieldset::toHtml方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toHtml
public function toHtml()
{
$model = $this->getModel();
parent::__construct(array('legend' => __('Additional')));
$this->addField('ignore', 'multiselect', array('name' => 'properties[ignore]', 'label' => __('Ingnored Pages'), 'required' => false, 'value' => $model->getProperty('ignore'), 'values' => Mage::getSingleton('adminhtml/system_config_source_cms_page')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('ignore')));
return parent::toHtml();
}
示例2: toHtml
public function toHtml()
{
$model = $this->getModel();
parent::__construct(array('legend' => __('URL Settings')));
$this->addField('url_template', 'text', array('name' => 'properties[url_template]', 'label' => __('Url Template'), 'required' => true, 'value' => $model->getProperty('url_template'), 'note' => Mage::helper('searchindex/help')->field('url_template')));
return parent::toHtml();
}
示例3: toHtml
public function toHtml()
{
$html = parent::toHtml();
if (!@class_exists('Extendware_EWCore_Model_Autoload')) {
return $html;
}
$tips = $this->_getExtendwareTips($this, 'hover', array('opentip' => array('tipJoint' => 'top right')));
if (empty($tips) === false) {
$id = 'ew-' . Mage::helper('core')->getRandomString(8);
$code = '<div class="ewcore-tooltip-fieldset-label" id="' . $id . '"></div>';
$html = preg_replace('/<div\\s+?class="form-buttons">/s', '<div class="form-buttons">' . $code, $html);
foreach ($tips as $tip) {
if (array_key_exists('title', $tip) === false) {
$tip['title'] = (string) $this->getData('legend');
}
$scripts[] = $this->_getExtendwareTipJs('$("' . $id . '")', $tip);
}
}
foreach ($this->getElements() as $element) {
$rowHtml = $this->_extractRowHtml($element->getId(), $html);
if (empty($rowHtml)) {
continue;
}
$tips = $this->_getExtendwareTips($element, Mage::helper('ewcore/config')->getDefaultFormHelpTriggerMode());
foreach ($tips as $tip) {
if (array_key_exists('title', $tip) === false) {
$tip['title'] = (string) $element->getData('label');
}
if (strpos($tip['mode'], 'label') !== false or strpos($tip['mode'], 'both') !== false) {
if (preg_match('/<td\\s+?class="label">(.+?)<\\/td>/is', $rowHtml, $match)) {
$id = 'ew-' . Mage::helper('core')->getRandomString(8);
$classes = 'ewcore-tooltip-label ' . (strpos($tip['mode'], 'click') !== false ? 'ewcore-tooltip-label-clickable' : '');
$label = preg_replace('/<label([^>]*?)>(.*?)<\\/label>/si', '<label\\1><span id="' . $id . '" class="' . $classes . '">\\2</span></label>', $match[0]);
$html = str_replace($rowHtml, str_replace($match[0], $label, $rowHtml), $html);
$scripts[] = $this->_getExtendwareTipJs('$("' . $id . '")', $tip);
}
}
if (strpos($tip['mode'], 'input') !== false or strpos($tip['mode'], 'both') !== false) {
if (!preg_match('/<select\\s+/si', $rowHtml)) {
$scripts[] = $this->_getExtendwareTipJs('$("' . $element->getHtmlId() . '")', $tip);
}
}
if ($tip['mode'] == 'hover') {
$id = 'ew-' . Mage::helper('core')->getRandomString(8);
$newRowHtml = str_replace('<tr>', '<tr id="' . $id . '">', $rowHtml);
$html = str_replace($rowHtml, $newRowHtml, $html);
$scripts[] = $this->_getExtendwareTipJs('$("' . $id . '")', $tip);
}
}
}
if (empty($scripts) === false) {
$html .= '<script type="text/javascript">try{';
foreach ($scripts as $script) {
$html .= $script . "\n";
}
$html .= '} catch(e) {}</script>';
}
return $html;
}
示例4: toHtml
public function toHtml()
{
$model = $this->getModel();
parent::__construct(array('legend' => __('Database Settings')));
$this->addField('db_connection_name', 'text', array('name' => 'properties[db_connection_name]', 'label' => __('Database Connection Name'), 'required' => true, 'value' => $model->getProperty('db_connection_name') ? $model->getProperty('db_connection_name') : 'default_setup', 'note' => Mage::helper('searchindex/help')->field('db_connection_name')));
$this->addField('db_table_prefix', 'text', array('name' => 'properties[db_table_prefix]', 'label' => __('Table Prefix'), 'required' => false, 'value' => $model->getProperty('db_table_prefix'), 'note' => Mage::helper('searchindex/help')->field('db_table_prefix')));
return parent::toHtml();
}
示例5: toHtml
public function toHtml()
{
$model = $this->getModel();
if (!Mage::app()->isSingleStoreMode()) {
parent::__construct(array('legend' => Mage::helper('searchindex')->__('Store Settings')));
$this->addField('store_id', 'multiselect', array('label' => Mage::helper('searchindex')->__('Store View'), 'required' => true, 'name' => 'properties[store_id]', 'value' => $model->getProperty('store_id'), 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()));
}
return parent::toHtml();
}
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:9,代码来源:Mirasvit_SearchIndex_Block_Adminhtml_Index_Edit_Index_External_Store.php
示例6: toHtml
public function toHtml()
{
$model = $this->getModel();
parent::__construct(array('legend' => __('Additional Search Index Configuration')));
$this->addField('include_category', 'select', array('name' => 'properties[include_category]', 'label' => __('Search by parent categories names'), 'required' => true, 'value' => $model->getProperty('include_category'), 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('include_category')));
$this->addField('include_bundled', 'select', array('name' => 'properties[include_bundled]', 'label' => __('Search by child products attributes (for bundle and configurable products)'), 'required' => true, 'value' => $model->getProperty('include_bundled'), 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('include_bundled')));
$this->addField('include_tag', 'select', array('name' => 'properties[include_tag]', 'label' => __('Search by product tags'), 'required' => true, 'value' => $model->getProperty('include_tag'), 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('include_tag')));
$this->addField('include_id', 'select', array('name' => 'properties[include_id]', 'label' => __('Search by product id'), 'required' => true, 'value' => $model->getProperty('include_id'), 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('include_id')));
$this->addField('out_of_stock_to_end', 'select', array('name' => 'properties[out_of_stock_to_end]', 'label' => __('Push "out of stock" products to the end'), 'required' => false, 'value' => $model->getProperty('out_of_stock_to_end'), 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'note' => Mage::helper('searchindex/help')->field('out_of_stock_to_end')));
return parent::toHtml();
}
示例7: toHtml
public function toHtml()
{
$model = $this->getModel();
parent::__construct(array('legend' => __('Attribute')));
$attributes = Mage::getSingleton('eav/config')->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getAttributeCollection();
$values = array();
foreach ($attributes as $attr) {
if (in_array($attr->getData('frontend_input'), array('select', 'multiselect'))) {
$values[$attr->getAttributeCode()] = $attr->getFrontendLabel() . ' [' . $attr->getAttributeCode() . ']';
}
}
$this->addField('attribute', 'select', array('name' => 'properties[attribute]', 'label' => __('Attribute'), 'required' => true, 'value' => $model->getProperty('attribute'), 'values' => $values));
$this->addField('url_template', 'text', array('name' => 'properties[url_template]', 'label' => __('Url Template'), 'required' => true, 'value' => $model->getProperty('url_template')));
return parent::toHtml();
}