Skip to content

Commit

Permalink
API Remove widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 20, 2024
1 parent 55dd419 commit 9de908b
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 81 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

### Suggested Modules

* Silverstripe Widgets Module
* Silverstripe Comments Module

## Installation
Expand Down
9 changes: 0 additions & 9 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ Name: blogconfig
SilverStripe\Security\Member:
extensions:
- SilverStripe\Blog\Model\BlogMemberExtension

---
Name: featuredpostswidget
Only:
moduleexists: silverstripe/widgets
---
SilverStripe\Blog\Model\BlogPost:
extensions:
- SilverStripe\Blog\Model\BlogPostFeaturedExtension
18 changes: 0 additions & 18 deletions docs/en/configuring-widgets.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Development
* [Configuring blog posts in Sitetree](configuring-blog-posts.md)
* [Configuring blog when on large websites](configuring-large-websites.md)
* [Configuring widgets](configuring-widgets.md)
* [Configuring pagination](configuring-pagination.md)
* [Configuring featured image uploads](configuring-featured-images.md)

Expand Down
3 changes: 1 addition & 2 deletions docs/en/userguide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary: Working with blogging and comments in SilverStripe CMS.

## Before we begin

Make sure that your SilverStripe CMS installation has the [Blog](https://addons.silverstripe.org/add-ons/silverstripe/blog/) module and optional, [Widgets](https://addons.silverstripe.org/add-ons/silverstripe/widgets/) and [Comments](https://addons.silverstripe.org/add-ons/silverstripe/comments/) modules installed.
Make sure that your SilverStripe CMS installation has the [Blog](https://addons.silverstripe.org/add-ons/silverstripe/blog/) module and optional, and [Comments](https://addons.silverstripe.org/add-ons/silverstripe/comments/) modules installed.

## Blogging features

Expand All @@ -16,5 +16,4 @@ Make sure that your SilverStripe CMS installation has the [Blog](https://addons.
* [Roles](roles.md)
* [RSS Feed](rss-feed.md)
* [Tags and categories](tags-and-categories.md)
* [Using widgets](using-widgets.md)
* [Managing comments](managing-comments.md)
48 changes: 0 additions & 48 deletions docs/en/userguide/using-widgets.md

This file was deleted.

1 change: 1 addition & 0 deletions src/Model/BlogCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private function scaffoldFormFieldForManyRelation(
$parent = ($ownerRecord instanceof SiteTree) ? $ownerRecord->Parent() : null;
$field = TagField::create(
$relationName,
/** @phpstan-ignore translation.key (we need the key to be dynamic here) */
_t($ownerRecord->ClassName . '.' . $relationName, $fieldTitle),
($parent instanceof Blog) ? $parent->Categories() : static::get(),
$ownerRecord->$relationName()
Expand Down
2 changes: 0 additions & 2 deletions src/Model/BlogPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ class BlogPost extends Page

/**
* The ProvideComments db column is defined in the silverstripe/comments module
* The InheritSideBar db column is defined in the silverstripe/widgets module
*
* @var array
*/
private static $defaults = [
'ShowInMenus' => false,
'InheritSideBar' => true,
'ProvideComments' => true
];

Expand Down
1 change: 1 addition & 0 deletions src/Model/BlogTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private function scaffoldFormFieldForManyRelation(
$parent = ($ownerRecord instanceof SiteTree) ? $ownerRecord->Parent() : null;
$field = TagField::create(
$relationName,
/** @phpstan-ignore translation.key (we need the key to be dynamic here) */
_t($ownerRecord->ClassName . '.' . $relationName, $fieldTitle),
($parent instanceof Blog) ? $parent->Tags() : static::get(),
$ownerRecord->$relationName()
Expand Down

0 comments on commit 9de908b

Please sign in to comment.