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


PHP GridField::ID方法代码示例

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


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

示例1: getHTMLFragments

 /**
  * Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
  * @param GridField $gridField Grid Field Reference
  * @return Array Map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
  */
 public function getHTMLFragments($gridField)
 {
     Requirements::css('gridfieldajaxrefresh/css/GridFieldAjaxRefresh.css');
     Requirements::javascript('gridfieldajaxrefresh/javascript/GridFieldAjaxRefresh.js');
     $data = array('RefreshDelay' => $this->refreshDelay, 'AutoRefresh' => $this->autoRefresh, 'GridFieldID' => $gridField->ID());
     $forTemplate = new ArrayData($data);
     $args = array('ID' => $gridField->ID());
     return array($this->targetFragment => $forTemplate->renderWith('GridFieldAjaxRefresh_Header', $args));
 }
开发者ID:helpfulrobot,项目名称:silverstripe-gridfieldajaxrefresh,代码行数:14,代码来源:GridFieldAjaxRefresh.php

示例2: getColumnContent

 /**
  * HTML for the column, content of the <td> element.
  *
  * @param  \GridField $gridField
  * @param  \DataObject $record - Record displayed in this row
  * @param  string $columnName
  *
  * @return string - HTML for the column. Return NULL to skip.
  */
 public function getColumnContent($gridField, $record, $columnName)
 {
     $classes = 'ss-gridfield-editable-row--icon';
     if ($record) {
         $classes .= ' ss-gridfield-editable-row--toggle';
     }
     $openToggleId = 'EditableRowToggles.' . $gridField->ID() . '.' . get_class($record) . '_' . $record->ID;
     if ($this->openNewTogglesOnCreate && Session::get($openToggleId)) {
         $classes .= ' ss-gridfield-editable-row--toggle_start';
     }
     Session::clear($openToggleId);
     return sprintf('<i class="%s"></i>', $classes);
 }
开发者ID:helpfulrobot,项目名称:milkyway-multimedia-ss-gridfield-utils,代码行数:22,代码来源:EditableRow.php


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