當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。