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


PHP CompositeField::Field方法代码示例

本文整理汇总了PHP中CompositeField::Field方法的典型用法代码示例。如果您正苦于以下问题:PHP CompositeField::Field方法的具体用法?PHP CompositeField::Field怎么用?PHP CompositeField::Field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CompositeField的用法示例。


在下文中一共展示了CompositeField::Field方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Field

 /**
  * Renders the button, includes the JS and CSS
  * @param array $properties
  */
 public function Field($properties = array())
 {
     Requirements::css(BETTER_BUTTONS_DIR . '/css/dropdown_form_action.css');
     Requirements::javascript(BETTER_BUTTONS_DIR . '/javascript/dropdown_form_action.js');
     $this->setAttribute('data-form-action-dropdown', '#' . $this->DropdownID());
     return parent::Field();
 }
开发者ID:dawidcieszynski,项目名称:silverstripe-gridfield-betterbuttons,代码行数:11,代码来源:DropdownFormAction.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->Field());
     $root = $parser->getBySelector('fieldset.composite');
     $legend = $parser->getBySelector('fieldset.composite legend');
     $this->assertNotNull($legend);
     $this->assertEquals('My legend', (string) $legend[0]);
 }
开发者ID:XDdesigners,项目名称:silverstripe-framework,代码行数:11,代码来源:CompositeFieldTest.php

示例3: getColumnContent

 public function getColumnContent($gridField, $record, $columnName)
 {
     if (!$record->canEdit()) {
         return;
     }
     $field = new CompositeField();
     if (!$record instanceof ElementVirtualLinked) {
         $field->push(GridField_FormAction::create($gridField, 'UnlinkRelation' . $record->ID, false, "unlinkrelation", array('RecordID' => $record->ID))->addExtraClass('gridfield-button-unlink')->setAttribute('title', _t('GridAction.UnlinkRelation', "Unlink"))->setAttribute('data-icon', 'chain--minus'));
     }
     if ($record->canDelete() && $record->VirtualClones()->count() == 0) {
         $field->push(GridField_FormAction::create($gridField, 'DeleteRecord' . $record->ID, false, "deleterecord", array('RecordID' => $record->ID))->addExtraClass('gridfield-button-delete')->setAttribute('title', _t('GridAction.Delete', "Delete"))->setAttribute('data-icon', 'cross-circle')->setDescription(_t('GridAction.DELETE_DESCRIPTION', 'Delete')));
     }
     return $field->Field();
 }
开发者ID:dnadesign,项目名称:silverstripe-elemental,代码行数:14,代码来源:ElementalGridFieldDeleteAction.php

示例4: Field

 public function Field($properties = [])
 {
     if ($this->firstActive) {
         $this->makeFirstActive();
     }
     return parent::Field($properties);
 }
开发者ID:milkyway-multimedia,项目名称:ss-mwm-formfields,代码行数:7,代码来源:ComponentFieldHolder.php

示例5: Field

 public function Field($properties = array())
 {
     $this->prepareForRender();
     return parent::Field($properties);
 }
开发者ID:silbinarywolf,项目名称:multirecordfield,代码行数:5,代码来源:MultiRecordSubRecordField.php


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