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


PHP GridFieldConfig_RecordEditor::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($itemsPerPage = null, $sort = true)
 {
     parent::__construct($itemsPerPage);
     if ($sort) {
         if (class_exists('GridFieldSortableRows')) {
             $this->addComponent(new GridFieldSortableRows('SortOrder'));
         } elseif (class_exists('GridFieldOrderableRows')) {
             $this->addComponent(new GridFieldOrderableRows('SortOrder'));
         }
     }
     if (class_exists('GridFieldBulkManager')) {
         $this->addComponent(new GridFieldBulkManager());
     }
 }
开发者ID:lekoala,项目名称:silverstripe-form-extras,代码行数:14,代码来源:GridFieldConfig_RecordDefault.php

示例2: __construct

 /**
  * @param int $itemsPerPage
  * @param array|SS_List $mergeRecords
  * @param string $parentType
  * @param string $parentMethod
  * @param string $childMethod
  */
 public function __construct($itemsPerPage = 15, $mergeRecords, $parentType, $parentMethod, $childMethod)
 {
     parent::__construct($itemsPerPage);
     $this->removeComponentsByType('GridFieldAddNewButton');
     $this->addComponent(new GridFieldAddByDBField('buttons-before-left'));
     $this->addComponent(new GridFieldMergeAction($mergeRecords, $parentType, $parentMethod, $childMethod));
     /**
      * @var GridFieldDataColumns $columns
      */
     $columns = $this->getComponentByType('GridFieldDataColumns');
     $columns->setFieldFormatting(array('BlogPostsCount' => function ($value, CategorisationObject $item) {
         return $item->BlogPosts()->Count();
     }));
     $this->changeColumnOrder();
 }
开发者ID:sunnysideup,项目名称:silverstripe-blog,代码行数:22,代码来源:GridFieldCategorisationConfig.php

示例3: __construct

 public function __construct($itemsPerPage = 25)
 {
     parent::__construct($itemsPerPage);
     // $this->addComponent(new GridFieldExportButton());
     $this->addComponent(new CommentsGridFieldAction());
     // Format column
     $columns = $this->getComponentByType('GridFieldDataColumns');
     $columns->setFieldFormatting(array('ParentTitle' => function ($value, &$item) {
         return sprintf('<a href="%s" class="cms-panel-link external-link action" target="_blank">%s</a>', Convert::raw2att($item->Link()), $item->obj('ParentTitle')->forTemplate());
     }));
     // Add bulk option
     $manager = new GridFieldBulkManager();
     $manager->addBulkAction('spam', 'Spam', 'CommentsGridFieldBulkAction_Handlers', array('isAjax' => true, 'icon' => 'cross', 'isDestructive' => false));
     $manager->addBulkAction('approve', 'Approve', 'CommentsGridFieldBulkAction_Handlers', array('isAjax' => true, 'icon' => 'cross', 'isDestructive' => false));
     $manager->removeBulkAction('bulkEdit');
     $manager->removeBulkAction('unLink');
     $this->addComponent($manager);
 }
开发者ID:bhavesh1212310,项目名称:silverstripe-comments,代码行数:18,代码来源:CommentsGridFieldConfig.php

示例4: __construct

 /**
  * @param {int} $itemsPerPage How many items per page should show up
  */
 public function __construct($itemsPerPage = null)
 {
     parent::__construct($itemsPerPage);
     $this->removeComponentsByType('GridFieldDetailForm')->addComponent(new FrontEndGridFieldDetailForm());
 }
开发者ID:helpfulrobot,项目名称:webbuilders-group-silverstripe-frontendgridfield,代码行数:8,代码来源:FrontEndGridFieldConfig.php

示例5: __construct

 public function __construct($itemsPerPage = null, $numberToLimitTo = null)
 {
     parent::__construct($itemsPerPage);
     $this->removeComponentsByType('GridFieldDetailForm');
     $this->addComponent(new LRGridFieldDetailForm('DetailForm', $numberToLimitTo));
 }
开发者ID:helpfulrobot,项目名称:webbuilders-group-silverstripe-limitedrelationsgridfield,代码行数:6,代码来源:LRGridFieldConfig.php

示例6: GridFieldUserColumns

 function __construct($itemsPerPage = null)
 {
     parent::__construct($itemsPerPage);
     $this->addComponent(new GridFieldUserColumns());
 }
开发者ID:helpfulrobot,项目名称:silverstripe-gridfield-addons,代码行数:5,代码来源:GridFieldUserColumns.php


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