当前位置: 首页>>代码示例>>PHP>>正文


PHP CompositeField::FieldHolder方法代码示例

本文整理汇总了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()));
 }
开发者ID:XDdesigners,项目名称:silverstripe-framework,代码行数:10,代码来源:CompositeFieldTest.php

示例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]);
 }
开发者ID:jacobbuck,项目名称:silverstripe-framework,代码行数:11,代码来源:CompositeFieldTest.php

示例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);
 }
开发者ID:jacobbuck,项目名称:silverstripe-framework,代码行数:7,代码来源:SelectionGroup.php

示例4: FieldHolder

 public function FieldHolder($properties = array())
 {
     $this->labelField->setAttribute("for", $this->checkboxField->ID());
     return parent::FieldHolder($properties);
 }
开发者ID:helpfulrobot,项目名称:gdmedia-silverstripe-gdm-extensions,代码行数:5,代码来源:LabeledCheckboxField.php

示例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();
 }
开发者ID:helpfulrobot,项目名称:swipestripe-swipestripe,代码行数:12,代码来源:OptionGroupField.php


注:本文中的CompositeField::FieldHolder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。