mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-06-28 14:49:21 +02:00
25 lines
566 B
PHP
Executable File
25 lines
566 B
PHP
Executable File
<?php
|
|
|
|
|
|
namespace A2nt\CMSNiceties\Extensions;
|
|
|
|
use SilverStripe\Blog\Forms\GridField\GridFieldConfigBlogPost;
|
|
use SilverStripe\Forms\FieldList;
|
|
use SilverStripe\ORM\DataExtension;
|
|
|
|
/**
|
|
* Class \A2nt\CMSNiceties\Extensions\BlogExtension
|
|
*
|
|
* @property \A2nt\CMSNiceties\Extensions\BlogExtension $owner
|
|
*/
|
|
class BlogExtension extends DataExtension
|
|
{
|
|
public function updateCMSFields(FieldList $fields)
|
|
{
|
|
$f = $fields->dataFieldByName('ChildPages');
|
|
if ($f) {
|
|
$f->setConfig(GridFieldConfigBlogPost::create(75));
|
|
}
|
|
}
|
|
}
|