silverstripe-blog/src/Forms/GridField/GridFieldConfig_BlogPost.php

25 lines
610 B
PHP
Raw Normal View History

2015-11-21 07:17:29 +01:00
<?php
namespace SilverStripe\Blog\Forms\GridField;
use SilverStripe\Lumberjack\Forms\GridFieldConfig_Lumberjack;
use SilverStripe\Lumberjack\Forms\GridFieldSiteTreeState;
2015-11-21 07:17:29 +01:00
/**
* GridField config necessary for managing a SiteTree object.
*
*/
class GridFieldConfig_BlogPost extends GridFieldConfig_Lumberjack
{
/**
* @param null|int $itemsPerPage
*/
public function __construct($itemsPerPage = null)
{
parent::__construct($itemsPerPage);
$this->removeComponentsByType(GridFieldSiteTreeState::class);
2015-11-21 07:17:29 +01:00
$this->addComponent(new GridFieldBlogPostState());
}
}