本文整理汇总了PHP中CompositeField::FieldHolder方法的典型用法代码示例。如果您正苦于以下问题:PHP CompositeField::FieldHolder方法的具体用法?PHP CompositeField::FieldHolder怎么用?PHP CompositeField::FieldHolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompositeField
的用法示例。
在下文中一共展示了CompositeField::FieldHolder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testTag
public function testTag()
{
$div = new CompositeField(new TextField('A'), new TextField('B'));
$this->assertStringStartsWith('<div', trim($div->FieldHolder()));
$this->assertStringEndsWith('/div>', trim($div->FieldHolder()));
$fieldset = new CompositeField();
$fieldset->setTag('fieldset');
$this->assertStringStartsWith('<fieldset', trim($fieldset->FieldHolder()));
$this->assertStringEndsWith('/fieldset>', trim($fieldset->FieldHolder()));
}
示例2: testLegend
public function testLegend()
{
$composite = new CompositeField(new TextField('A'), new TextField('B'));
$composite->setTag('fieldset');
$composite->setLegend('My legend');
$parser = new CSSContentParser($composite->FieldHolder());
$root = $parser->getBySelector('fieldset.composite');
$legend = $parser->getBySelector('fieldset.composite legend');
$this->assertNotNull($legend);
$this->assertEquals('My legend', (string) $legend[0]);
}
示例3: FieldHolder
public function FieldHolder($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/SelectionGroup.js');
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/SelectionGroup.css');
return parent::FieldHolder($properties);
}
示例4: FieldHolder
public function FieldHolder($properties = array())
{
$this->labelField->setAttribute("for", $this->checkboxField->ID());
return parent::FieldHolder($properties);
}
示例5: FieldHolder
/**
* Display this field, add some javascript for handling changes to the dropdowns,
* populating the next dropdown via AJAX etc.
*
* @see CompositeField::FieldHolder()
*/
function FieldHolder()
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript('swipestripe/javascript/OptionGroupField.js');
return parent::FieldHolder();
}