本文整理匯總了PHP中EmailField::Field方法的典型用法代碼示例。如果您正苦於以下問題:PHP EmailField::Field方法的具體用法?PHP EmailField::Field怎麽用?PHP EmailField::Field使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EmailField
的用法示例。
在下文中一共展示了EmailField::Field方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testFieldHasExtraClass
function testFieldHasExtraClass()
{
/* TextField has an extra class name and is in the HTML the field returns */
$textField = new TextField('Name');
$textField->addExtraClass('thisIsMyClassNameForTheFormField');
preg_match('/thisIsMyClassNameForTheFormField/', $textField->Field(), $matches);
$this->assertTrue($matches[0] == 'thisIsMyClassNameForTheFormField');
/* EmailField has an extra class name and is in the HTML the field returns */
$emailField = new EmailField('Email');
$emailField->addExtraClass('thisIsMyExtraClassForEmailField');
preg_match('/thisIsMyExtraClassForEmailField/', $emailField->Field(), $matches);
$this->assertTrue($matches[0] == 'thisIsMyExtraClassForEmailField');
/* OptionsetField has an extra class name and is in the HTML the field returns */
$optionsetField = new OptionsetField('FeelingOk', 'Are you feeling ok?', array(0 => 'No', 1 => 'Yes'), '', null, '(Select one)');
$optionsetField->addExtraClass('thisIsMyExtraClassForOptionsetField');
preg_match('/thisIsMyExtraClassForOptionsetField/', $optionsetField->Field(), $matches);
$this->assertTrue($matches[0] == 'thisIsMyExtraClassForOptionsetField');
}
示例2: Field
public function Field($properties = array())
{
return parent::Field($properties);
}