mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #757 from creative-commoners/pulls/5/protect-hooks
API Set extension hook implementation visibility to protected
This commit is contained in:
commit
591aa843bd
@ -90,7 +90,7 @@ class BlogFilter extends Lumberjack
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$excluded = $this->owner->getExcludedSiteTreeClassNames();
|
$excluded = $this->owner->getExcludedSiteTreeClassNames();
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class BlogMemberExtension extends DataExtension
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function onBeforeWrite()
|
protected function onBeforeWrite()
|
||||||
{
|
{
|
||||||
$count = 1;
|
$count = 1;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ class BlogMemberExtension extends DataExtension
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$fields->removeByName('URLSegment');
|
$fields->removeByName('URLSegment');
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ class BlogPost extends Page
|
|||||||
*
|
*
|
||||||
* Update the PublishDate to now if the BlogPost would otherwise be published without a date.
|
* Update the PublishDate to now if the BlogPost would otherwise be published without a date.
|
||||||
*/
|
*/
|
||||||
public function onBeforePublish()
|
protected function onBeforePublish()
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DBDatetime $publishDate
|
* @var DBDatetime $publishDate
|
||||||
@ -509,7 +509,7 @@ class BlogPost extends Page
|
|||||||
*
|
*
|
||||||
* Sets blog relationship on all categories and tags assigned to this post.
|
* Sets blog relationship on all categories and tags assigned to this post.
|
||||||
*/
|
*/
|
||||||
public function onAfterWrite()
|
protected function onAfterWrite()
|
||||||
{
|
{
|
||||||
parent::onAfterWrite();
|
parent::onAfterWrite();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class BlogPostFeaturedExtension extends DataExtension
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
// Add the checkbox in.
|
// Add the checkbox in.
|
||||||
$fields->addFieldToTab(
|
$fields->addFieldToTab(
|
||||||
|
@ -27,7 +27,7 @@ class BlogPostFilter extends DataExtension
|
|||||||
* @param SQLSelect $query
|
* @param SQLSelect $query
|
||||||
* @param DataQuery $query
|
* @param DataQuery $query
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
|
protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Controller::has_curr() && Controller::curr() instanceof LeftAndMain) {
|
if (Controller::has_curr() && Controller::curr() instanceof LeftAndMain) {
|
||||||
@ -60,7 +60,7 @@ class BlogPostFilter extends DataExtension
|
|||||||
* @param DataQuery $dataQuery
|
* @param DataQuery $dataQuery
|
||||||
* @param DataObject $dataObject
|
* @param DataObject $dataObject
|
||||||
*/
|
*/
|
||||||
public function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject)
|
protected function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject)
|
||||||
{
|
{
|
||||||
$blogPostTable = DataObject::getSchema()->tableName(BlogPost::class);
|
$blogPostTable = DataObject::getSchema()->tableName(BlogPost::class);
|
||||||
$dataQuery->innerJoin(
|
$dataQuery->innerJoin(
|
||||||
|
Loading…
Reference in New Issue
Block a user