本文整理汇总了PHP中Zend_Form_Element::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element::__construct方法的具体用法?PHP Zend_Form_Element::__construct怎么用?PHP Zend_Form_Element::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element
的用法示例。
在下文中一共展示了Zend_Form_Element::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($spec = '', $options = '')
{
parent::__construct($spec, $options);
// $table = new AttributeDescriptor();
// $select = $table->select();
// $select->order(AttributeDescriptor::COL_NAME);
// $select->where(AttributeDescriptor::COL_SHOW_IN_LIST . "= ?", 1);
// if ($group != '') {
// $select->where(AttributeDescriptor::COL_GROUP . "= ?",$group);
// }
// $rowset = $table->fetchAll($select);
// $array = $rowset->toArray();
// $optArray = array(null=>'Please select');
//
// foreach ($array as $value) {
// $optArray = $optArray + array($value[AttributeDescriptor::COL_ID]=>$value[AttributeDescriptor::COL_NAME]);
// }
// $this->setMultiOptions($optArray);
$from = new Zend_Form_Element_Text($spec);
$this->setIsArray(TRUE);
$to = new Zend_Form_Element_Text($spec);
$this->setIsArray(TRUE);
$this->add($from);
$this->add($to);
//$this->
}
示例2: __construct
public function __construct($script, $spec, $wide = true, $options = null, $class = null)
{
parent::__construct($spec, $options);
if ($wide == true) {
$this->setDecorators(array('ViewScript', array(array('element' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('elementTr' => 'HtmlTag'), array('tag' => 'tr', 'class' => 'snep_form_element ' . $class))));
} else {
$this->setDecorators(array('ViewScript', array(array('element' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'th')), array(array('elementTr' => 'HtmlTag'), array('tag' => 'tr', 'class' => 'snep_form_element ' . $class))));
}
$this->getDecorator('ViewScript')->setViewScript($script);
}
示例3: __construct
public function __construct($spec, $options = null)
{
if (empty($options['id'])) {
$options['id'] = '';
}
$options['ignore'] = true;
parent::__construct($spec, $options);
$this->clearDecorators();
$this->setDecorators(array('ViewHelper'));
}
示例4: __construct
/**
* Constructor for element and adds validator
*
* @param array|string|Zend_Config $spec
* @param null $options
* @throws \Zend_Exception
* @throws \Zend_Form_Exception
*/
public function __construct($spec, $options = null)
{
if (empty($options['siteKey']) || empty($options['secretKey'])) {
throw new \Zend_Exception('Site key and secret key must be specified.');
}
$this->_siteKey = trim($options['siteKey']);
// trim the white space if there is any just to be sure
$this->_secretKey = trim($options['secretKey']);
// trim the white space if there is any just to be sure
$this->addValidator('Recaptcha', false, array('secretKey' => $this->_secretKey));
$this->setAllowEmpty(false);
parent::__construct($spec, $options);
}
示例5: __construct
/**
* Constructor
*
* @param mixed $spec
* @param mixed $options
* @return void
*/
public function __construct($spec, $options = null)
{
$this->addPrefixPath('ZendX_JQuery_Form_Decorator', 'ZendX/JQuery/Form/Decorator', 'decorator');
parent::__construct($spec, $options);
}
示例6: __construct
/**
* Constructor
*
* @todo Should we set dojo view helper paths here?
* @param mixed $spec
* @param mixed $options
* @return void
*/
public function __construct($spec, $options = null)
{
$this->addPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator', 'decorator');
parent::__construct($spec, $options);
}
示例7: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->getView()->addHelperPath(__DIR__ . '/../Helper', 'Html5Input_Helper_');
}
示例8: __construct
/**
* constructs email element
*
* @param string $spec
* @param string $options
* @author aur1mas <aurimas@devnet.lt>
*/
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->addValidator(new Zend_Validate_EmailAddress());
}
示例9: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->bsUtils = new Zendstrap_Form_MyBootstrapUtils();
}
示例10: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
}
示例11: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->removeDecorator('label');
$this->removeDecorator('htmlTag');
}
示例12: __construct
/**
* Elemento utilizado apenas para limpar as definições css existentas antes de sua inclusão dentro de um form
* @author Jhonatan Morais <jhonatanvinicius@gmail.com>
*/
public function __construct()
{
parent::__construct($spec = 'clear');
}
示例13: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->setDecorators(array());
}