Add input:mail element

@param $name
@param string $label
@param array $attr
@return \FrenchFrogs\Form\Element\Email
331736
public function addEmail($name, $label = '',$is_mandatory = true )
    {
        $e = new \FrenchFrogs\Form\Element\Email($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }
        $e->addRule('email');

        return $e;
    }
1198748
protected function getLabelElement($name, Label $label)
    {
        $labelStub = $this->getStubContent('form-label-field.blade', $this->template);

        $this->replaceFieldName($labelStub, $name)
            ->replaceFieldTitle($labelStub, $this->getTitle($label));

        return $labelStub;
    }
748680
public function createBodyElement($name, $label, $required = false, $hidden = false, $mailFields = array(), $mailFieldsLabel = false) {
        if ($hidden) {
            return new \Zend_Form_Element_Hidden($name);
        }

        $options['required'] = $required;
        $options['label']    = $label;

        $mailBody                            = new \Gems_Form_Element_CKEditor($name, $options);
        $mailBody->config['availablefields'] = $mailFields;
        if ($mailFieldsLabel) {
            $mailBody->config['availablefieldsLabel'] = $mailFieldsLabel;
        } else {
            $mailBody->config['availablefieldsLabel'] = $this->translate->_('Fields');
        }

        $mailBody->config['extraPlugins'] .= ',availablefields';
        $mailBody->config['toolbar'][]    = array('availablefields');

        return new \Gems_Form_Element_CKEditor($name, $options);
    }
809596
public function textField($key, $label=null, array $attr=[]){
		$field = $this->factory("text", $key, $label, $attr);
		return $this->addField($field);
	}
790468
public function addField($name, $attrs)
    {
        if (is_string($attrs)) {
            $attrs = ['type' => $attrs];
        }
        $attrs = array_intersect_key($attrs, $this->_fieldDefaults);
        $this->_fields[$name] = $attrs + $this->_fieldDefaults;

        return $this;
    }
450965
final protected function attribute($name, $label) {
		static $ordering = 1000; /** @var int $ordering */
		df_eav_setup()->addAttribute('customer', $name, [
			'input' => 'text'
			,'label' => "{$this->labelPrefix()} $label"
			,'position' => $ordering++
			,'required' => false
			,'sort_order' => $ordering
			,'system' => false
			,'type' => 'static'
			,'visible' => false
		]);
		/** @var int $attributeId */
		$attributeId = df_first(df_fetch_col('eav_attribute', 'attribute_id', 'attribute_code', $name));
		df_conn()->insert(df_table('customer_form_attribute'), [
			'attribute_id' => $attributeId, 'form_code' => 'adminhtml_customer'
		]);
	}
241333
public function addContainer($name, $label = '', $attr = [])
    {
        $c = new Column\Container($name, $label, $attr);
        $this->addColumn($c);
        return $c;
    }
640462
public function addButtonSubmit(string $name) : Element\Button\Submit
    {
        $button = new Element\Button\Submit($this, $name);
        $this->addComponent($name, $button);

        return $button;
    }
1195765
public function addNumber($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Number($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
358607
public function addSelect($name, $label, $multi = [],  $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Select($name, $label, $multi);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
380929
public function addTextarea($name, $label = '', $is_mandatory = true )
    {
        $e = new \FrenchFrogs\Form\Element\Textarea($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
999127
public function staticValue($key, $label=false, array $attr=[]){
		$field = $this->factory('static', $key, $label, $attr);
		return $this->addField($field);
	}
13275
public function generateField($name, $attr = array())
    {
        $tag = 'input';

        if (in_array($attr['type'], $this->customGenerate)) {
            $tag = $attr['type'];
        }
        $attr['name'] = $this->transformName($name);

        $attr = $this->getData($name, $attr);

        if ($tag !== 'input') {
            $generate = 'generate' . ucfirst(strtolower($tag)) . 'Field';
            return $this->{$generate}($attr);
        } else {
            return $this->Html->tag('input', $attr);
        }
    }
722182
public function addPre($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Pre($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
955674
public function password($name, $label, $attr = array())
    {
        return $this->input(
            $name,
            $label,
            array_merge(
                $attr,
                array('type' => 'password')
            )
        );
    }
530879
public function addButton($name, $label = '%s', $link = '#', $binds = [], $attr = [] )
    {
        $c = new Column\Button($name, $label, $link, $binds, $attr);
        $c->setOptionAsDefault();
        $this->addColumn($c);

        return $c;
    }
414319
protected function addAttribute(Tag $tag, $attrName)
	{
		$isUrl = false;
		$exprs = [];
		foreach ($this->captures as $key => $capture)
		{
			if ($capture['name'] !== $attrName)
			{
				continue;
			}
			$exprs[] = $capture['expr'];
			if (isset($this->references['asUrl'][$key]))
			{
				$isUrl = true;
			}
		}
		$exprs = array_unique($exprs);

		$regexp = $this->delimiter . '^';
		$regexp .= (count($exprs) === 1) ? $exprs[0] : '(?:' . implode('|', $exprs) . ')';
		$regexp .= '$' . $this->delimiter . 'D' . $this->modifiers;

		$attribute = $tag->attributes->add($attrName);

		$filter = $this->configurator->attributeFilters['#regexp'];
		$filter->setRegexp($regexp);
		$attribute->filterChain[] = $filter;

		if ($isUrl)
		{
			$filter = $this->configurator->attributeFilters['#url'];
			$attribute->filterChain[] = $filter;
		}
	}