本文整理汇总了PHP中Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract类的具体用法?PHP Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract怎么用?PHP Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addElement
/**
* Add form element
*
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $element
* @param bool $after
* @return Mage_XmlConnect_Model_Simplexml_Form
*/
public function addElement(Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $element, $after = false)
{
if ($this->getForm()) {
$this->getForm()->checkElementId($element->getId());
$this->getForm()->addElementToCollection($element);
}
parent::addElement($element, $after);
return $this;
}
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:16,代码来源:Abstract.php
示例2: _addValidator
/**
* Add validator for file field to fieldset xml object
*
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $fieldXmlObj
* @return Mage_XmlConnect_Block_Customer_Form_Renderer_File
*/
protected function _addValidator(Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $fieldXmlObj)
{
$validateRules = $this->getAttributeObject()->getValidateRules();
if (!empty($validateRules)) {
$validatorXmlObj = $fieldXmlObj->addValidator();
if (!empty($validateRules['max_file_size'])) {
$minTextLength = (int) $validateRules['max_file_size'];
$validatorXmlObj->addRule(array('type' => 'max_file_size', 'value' => $minTextLength, 'field_label' => $this->getLabel()));
}
if (!empty($validateRules['file_extensions'])) {
$maxTextLength = $validateRules['file_extensions'];
$validatorXmlObj->addRule(array('type' => 'file_extensions', 'value' => $maxTextLength, 'field_label' => $this->getLabel()));
}
}
return $this;
}
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:22,代码来源:File.php
示例3: addField
/**
* Add field element to fieldset
*
* @param string $elementId
* @param string $type
* @param array $config
* @param boolean $after
* @return Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract
*/
public function addField($elementId, $type, $config, $after = false)
{
$element = parent::addField($elementId, $type, $config, $after);
if ($renderer = Mage_XmlConnect_Model_Simplexml_Form::getFieldsetElementRenderer()) {
$element->setRenderer($renderer);
}
return $element;
}
开发者ID:quyip8818,项目名称:Mag,代码行数:17,代码来源:Fieldset.php
示例4: addElement
/**
* Add form element
*
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $element
* @param bool|string $after
* @return Mage_XmlConnect_Model_Simplexml_Form_Abstract
*/
public function addElement(Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract $element, $after = false)
{
$element->setForm($this);
$this->getElements()->add($element, $after);
return $this;
}
开发者ID:blazeriaz,项目名称:youguess,代码行数:13,代码来源:Abstract.php
示例5: __construct
/**
* Init multiline element
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
if (!isset($attributes['line_count'])) {
Mage::throwException(Mage::helper('xmlconnect')->__('"line_count" attribute is required for "multiline" element.'));
}
parent::__construct($attributes);
$this->setType('multiline');
}
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:13,代码来源:Multiline.php
示例6: __construct
/**
* Init validator rule element abstract
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
parent::__construct($attributes);
$this->_renderer = Mage_XmlConnect_Model_Simplexml_Form::getValidatorRuleRenderer();
$this->_setDefaultValidatorTypeMessages();
if (isset($attributes['type'])) {
$this->setType($attributes['type']);
}
}
开发者ID:blazeriaz,项目名称:youguess,代码行数:14,代码来源:Abstract.php
示例7: __construct
/**
* Init textarea element
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
parent::__construct($attributes);
$this->setType('textarea');
}
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:10,代码来源:Textarea.php
示例8: __construct
/**
* Init checkbox element
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
parent::__construct($attributes);
$this->setType('checkbox');
}
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:10,代码来源:Checkbox.php
示例9: __construct
/**
* Init password element
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
parent::__construct($attributes);
$this->setType('password');
}
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:10,代码来源:Password.php
注:本文中的Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论