本文整理汇总了PHP中FormField::extraClass方法的典型用法代码示例。如果您正苦于以下问题:PHP FormField::extraClass方法的具体用法?PHP FormField::extraClass怎么用?PHP FormField::extraClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormField
的用法示例。
在下文中一共展示了FormField::extraClass方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRemoveManyExtraClasses
public function testRemoveManyExtraClasses()
{
$field = new FormField('MyField');
$field->addExtraClass('class1 class2 class3 class4 class5');
//test we can remove a single class we just added
$field->removeExtraClass('class3');
$this->assertStringEndsWith('class1 class2 class4 class5', $field->extraClass());
//check we can remove many classes at once
$field->removeExtraClass('class1 class5');
$this->assertStringEndsWith('class2 class4', $field->extraClass());
//check that removing a dud class is fine
$field->removeExtraClass('dudClass');
$this->assertStringEndsWith('class2 class4', $field->extraClass());
}
示例2: extraClass
function extraClass()
{
$ret = parent::extraClass();
if ($this->extraClass) {
$ret .= " {$this->extraClass}";
}
return $ret;
}
示例3: extraClass
public function extraClass()
{
return implode(' ', array(parent::extraClass(), $this->showSearch ? "searchable" : null));
}
示例4: extraClass
function extraClass() {
return 'action ' . parent::extraClass();
}
示例5: extraClass
public function extraClass()
{
$classes = array('field', 'CompositeField', parent::extraClass());
if ($this->columnCount) {
$classes[] = 'multicolumn';
}
return implode(' ', $classes);
}
示例6: extraClass
public function extraClass()
{
return parent::extraClass() . ' input-wrapper';
}
示例7: extraClass
function extraClass(){
$ret = parent::extraClass();
if($this->extraClass) $ret .= " $this->extraClass";
return $ret;
}