/** * Renders an email field for a model attribute. * @param CModel $model the data model. * @param string $attribute the attribute. * @param array $htmlOptions additional HTML attributes. * @return string the generated input field. * @see TbHtml::activeEmailField */ public function emailField($model, $attribute, $htmlOptions = array()) { return TbHtml::activeEmailField($model, $attribute, $htmlOptions); }
public function testActiveEmailField() { $I = $this->codeGuy; $html = TbHtml::activeEmailField(new Dummy(), 'email', array('class' => 'input')); $input = $I->createNode($html, 'input[type=email]'); $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'Dummy_email', 'name' => 'Dummy[email]', 'value' => '*****@*****.**')); }
/** * Renders an email field for a model attribute. * This method is a wrapper of {@link TbHtml::activeEmailField}. * Please check {@link TbHtml::activeEmailField} for detailed information * about the parameters for this method. * @param CModel $model the data model * @param string $attribute the attribute * @param array $htmlOptions additional HTML attributes. * @return string the generated input field * @since 1.1.11 */ public function emailField($model, $attribute, $htmlOptions = array()) { return $this->wrapControl(TbHtml::activeEmailField($model, $attribute, $htmlOptions)); }