本文整理汇总了PHP中Varien_Data_Form_Element_Text::getHtmlId方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Text::getHtmlId方法的具体用法?PHP Varien_Data_Form_Element_Text::getHtmlId怎么用?PHP Varien_Data_Form_Element_Text::getHtmlId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Text
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Text::getHtmlId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDatabaseExists
/**
* @return bool
*/
public function getDatabaseExists()
{
if (strpos($this->_currentElement->getHtmlId(), 'dbName2') !== false) {
$value1 = Mage::registry('system_fastindexer_dbName1');
if (strtolower($this->_currentElement->getValue()) === strtolower($value1)) {
return false;
}
}
$dbName = $this->_currentElement->getData('value');
if (empty($dbName)) {
return false;
}
$result = $this->_connection->fetchOne('SELECT SCHEMA_NAME FROM `INFORMATION_SCHEMA`.`SCHEMATA` WHERE SCHEMA_NAME=:db', ['db' => $dbName]);
return $result !== false;
}
示例2: _getRemoveButton
/**
* @return Mage_Adminhtml_Block_Widget_Button
*/
protected function _getRemoveButton()
{
/** @var Mage_Adminhtml_Block_Widget_Button $removeButton */
$removeButton = $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('delete')->setLabel($this->__('Remove Image'))->setOnclick('document.getElementById(\'' . $this->_fieldInput->getHtmlId() . '\').value=\'\';if(document.getElementById(\'' . $this->_fieldInput->getHtmlId() . self::IMAGE_PREVIEW_SUFFIX . '\'))$(\'' . $this->_fieldInput->getHtmlId() . self::IMAGE_PREVIEW_SUFFIX . '\').parentNode.addClassName(\'no-display\');$(\'' . $this->_imageChooserButton->getHtmlId() . '\').writeAttribute(\'disabled\', false);$(\'' . $this->_imageChooserButton->getHtmlId() . '\').removeClassName(\'disabled\');$(this).addClassName(\'disabled\');$(this).writeAttribute(\'disabled\', true)')->setDisabled($this->_fieldInput->getReadonly())->setStyle('margin-left:10px;margin-top:7px');
// Check if there is a value. If no value then we want the remove button to be disabled
if (!$this->_fieldInput->getValue()) {
$removeButton->setDisabled(true);
}
return $removeButton;
}