/** * Renders a url 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::activeUrlField */ public function urlField($model, $attribute, $htmlOptions = array()) { return TbHtml::activeUrlField($model, $attribute, $htmlOptions); }
public function testActiveUrlField() { $I = $this->codeGuy; $html = TbHtml::activeUrlField(new Dummy(), 'url', array('class' => 'input')); $input = $I->createNode($html, 'input[type=url]'); $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'Dummy_url', 'name' => 'Dummy[url]', 'value' => 'http://www.getyiistrap.com')); }
/** * Renders a url field for a model attribute. * This method is a wrapper of {@link TbHtml::activeUrlField}. * Please check {@link TbHtml::activeUrlField} 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 Yii 1.1.11 */ public function urlField($model, $attribute, $htmlOptions = array()) { return $this->wrapControl(TbHtml::activeUrlField($model, $attribute, $htmlOptions)); }