mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Remove old PHP $this casting
This commit is contained in:
parent
de1b947c97
commit
cc17e81952
@ -142,20 +142,18 @@ class Blog extends Page implements PermissionProvider
|
||||
Requirements::css(BLOGGER_DIR . '/css/cms.css');
|
||||
Requirements::javascript(BLOGGER_DIR . '/js/cms.js');
|
||||
|
||||
$self =& $this;
|
||||
|
||||
$this->beforeUpdateCMSFields(function ($fields) use ($self) {
|
||||
if (!$self->canEdit()) {
|
||||
$this->beforeUpdateCMSFields(function ($fields) {
|
||||
if (!$this->canEdit()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$categories = GridField::create(
|
||||
'Categories',
|
||||
_t('Blog.Categories', 'Categories'),
|
||||
$self->Categories(),
|
||||
$this->Categories(),
|
||||
GridFieldCategorisationConfig::create(
|
||||
15,
|
||||
$self->Categories()->sort('Title'),
|
||||
$this->Categories()->sort('Title'),
|
||||
BlogCategory::class,
|
||||
'Categories',
|
||||
'BlogPosts'
|
||||
@ -165,10 +163,10 @@ class Blog extends Page implements PermissionProvider
|
||||
$tags = GridField::create(
|
||||
'Tags',
|
||||
_t('Blog.Tags', 'Tags'),
|
||||
$self->Tags(),
|
||||
$this->Tags(),
|
||||
GridFieldCategorisationConfig::create(
|
||||
15,
|
||||
$self->Tags()->sort('Title'),
|
||||
$this->Tags()->sort('Title'),
|
||||
BlogTag::class,
|
||||
'Tags',
|
||||
'BlogPosts'
|
||||
|
@ -58,14 +58,14 @@ class BlogPost extends Page
|
||||
private static $db = array(
|
||||
'PublishDate' => 'Datetime',
|
||||
'AuthorNames' => 'Varchar(1024)',
|
||||
'Summary' => 'HTMLText',
|
||||
'Summary' => 'HTMLText'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private static $has_one = array(
|
||||
'FeaturedImage' => 'SilverStripe\\Assets\\Image',
|
||||
'FeaturedImage' => 'SilverStripe\\Assets\\Image'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -74,7 +74,7 @@ class BlogPost extends Page
|
||||
private static $many_many = array(
|
||||
'Categories' => 'SilverStripe\\Blog\\Model\\BlogCategory',
|
||||
'Tags' => 'SilverStripe\\Blog\\Model\\BlogTag',
|
||||
'Authors' => 'SilverStripe\\Security\\Member',
|
||||
'Authors' => 'SilverStripe\\Security\\Member'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -83,7 +83,7 @@ class BlogPost extends Page
|
||||
private static $defaults = array(
|
||||
'ShowInMenus' => false,
|
||||
'InheritSideBar' => true,
|
||||
'ProvideComments' => true,
|
||||
'ProvideComments' => true
|
||||
);
|
||||
|
||||
/**
|
||||
@ -112,7 +112,7 @@ class BlogPost extends Page
|
||||
*/
|
||||
private static $casting = array(
|
||||
'Excerpt' => 'HTMLText',
|
||||
'Date' => 'SS_Datetime'
|
||||
'Date' => 'DBDatetime'
|
||||
);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user