本文整理汇总了PHP中Zend_Form_Element_Text::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Text::__construct方法的具体用法?PHP Zend_Form_Element_Text::__construct怎么用?PHP Zend_Form_Element_Text::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Text
的用法示例。
在下文中一共展示了Zend_Form_Element_Text::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* @brief Constructeur de classe
*
*
* @author francoisespinet
* @version 1 mars 2012 - 11:58:44
*/
function __construct()
{
//appel du constructeur du parent
parent::__construct($this->id);
//ajout du validateur
$this->addValidator(new Projet_Validate_Trigramme());
}
示例2: __construct
public function __construct($spec, $options = array())
{
$options = array_merge($options, array('disableLoadDefaultDecorators' => true));
parent::__construct($spec, $options);
$this->_decorator = new Monkeys_Form_Decorator_Composite();
$this->addDecorator($this->_decorator);
}
示例3: __construct
/**
* Constructor figures out which type of input to render
* @param $spec
* @param $options
* @return Void
*/
public function __construct($spec, $options = null)
{
if (empty($options['type'])) {
$options['type'] = $this->_getType();
}
parent::__construct($spec, $options);
}
示例4: __construct
/**
* Constructor that takes into account the type given, if given
* Proxies its parent constructor to provide rest of functionality
*
* @param $spec
* @param $options
* @uses Zend_Form_Element
*/
public function __construct($spec, $options = null)
{
if ($this->_isHtml5() && !isset($options['type'])) {
$options['type'] = $this->_getType($spec);
}
parent::__construct($spec, $options);
}
示例5: __construct
public function __construct($spec, $options = NULL)
{
if ($spec instanceof BuggyPress_Issue) {
$this->_issue = $spec;
$spec = self::FIELD_NAME;
}
parent::__construct($spec, $options);
}
示例6: __construct
/**
* Contructeur, prend le nom interne, le titre et la description du champ.
* Peut egalement prendre la valeur par defaut.
*
* @param string $internalName
* @param string $label
* @param string $description
* @param string $default
*/
public function __construct($internalName, $label, $description, $default = false)
{
parent::__construct($internalName);
$this->setLabel($label)->setDescription($description);
if ($default !== false) {
$this->setValue($default);
}
$this->setAttrib('size', '5')->addFilter('StripTags')->addValidator('Alnum');
}
示例7: __construct
/**
* Contructeur, prend le nom interne, le titre et la description du champ.
* Peut egalement prendre la valeur par defaut.
*
* @param string $internalName
* @param string $label
* @param string $description
* @param string $default
*/
public function __construct($internalName, $label, $description, $default = false)
{
parent::__construct($internalName);
$this->setLabel($label)->setDescription($description);
if ($default !== false) {
$this->setValue($default);
}
$this->setAttrib('size', '32')->addValidator('stringLength', false, array(4, 32))->addFilters(array('StripTags', 'StringtoLower'));
}
示例8: __construct
public function __construct($spec, $options = null)
{
$this->_table = $options['table'];
if (isset($options['field'])) {
$this->_field = $options['field'];
} else {
$this->_field = 'nome';
}
parent::__construct($spec, $options);
}
示例9: __construct
public function __construct($spec, $options = null)
{
if (isset($options['format'])) {
$this->_format = $options['format'];
unset($options['format']);
}
if (isset($options['db_format'])) {
$this->_db_format = $options['db_format'];
unset($options['db_format']);
}
parent::__construct($spec, $options);
}
示例10: __construct
public function __construct($spec, $aOptions = array())
{
if (isset($aOptions['ajax'])) {
$this->_ajax = $aOptions['ajax'];
unset($aOptions['ajax']);
}
if (isset($aOptions['deco'])) {
$this->_deco = $aOptions['deco'];
unset($aOptions['deco']);
}
parent::__construct($spec, $aOptions);
}
示例11: __construct
public function __construct($spec = null, $options = null, $required = false)
{
parent::__construct($spec, $options);
$this->addFilter('StringTrim')->setRequired($required)->setLabel($options['label'])->setAttrib('class', $options['class'])->addValidator('StringLength', false, array(1, 255));
if ($required && isset($options['notEmptyErrorMessage'])) {
$this->addValidator('NotEmpty', false, array('messages' => $options['notEmptyErrorMessage']));
}
if (isset($options['value'])) {
$this->setValue($options['value']);
}
if (isset($options['removeDecorators'])) {
$this->removeDecorator('HtmlTag')->removeDecorator('Label');
} else {
$this->setDecorators(array(new vkNgine_Form_Element_Decorator_Text()));
}
}
示例12: __construct
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
}
示例13: __construct
/**
* Constructor
*
* $spec may be:
* - string: name of element
* - array: options with which to configure element
* - \Zend_Config: \Zend_Config with options for configuring element
*
* @param string|array|\Zend_Config $spec
* @param array|\Zend_Config $options
* @return void
* @throws \Zend_Form_Exception if no element name after initialization
*/
public function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
$this->addClass($this->_elementClass);
}
示例14: __construct
public function __construct($spec, $options = null)
{
$options = array_merge($options, $this->_defaultOptions);
return parent::__construct($spec, $options);
}