From db071b269298fe87344b0c7fed634b53ef03dc80 Mon Sep 17 00:00:00 2001 From: Jason Irish Date: Thu, 14 Dec 2017 22:24:20 -0600 Subject: [PATCH] bugfix - set $table_name for widgets SilverStripe 4.0.1 throws warnings when the widget module is installed. --- src/Widgets/BlogArchiveWidget.php | 5 +++++ src/Widgets/BlogCategoriesWidget.php | 5 +++++ src/Widgets/BlogRecentPostsWidget.php | 5 +++++ src/Widgets/BlogTagsCloudWidget.php | 5 +++++ src/Widgets/BlogTagsWidget.php | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/src/Widgets/BlogArchiveWidget.php b/src/Widgets/BlogArchiveWidget.php index 2c9a988..a318639 100644 --- a/src/Widgets/BlogArchiveWidget.php +++ b/src/Widgets/BlogArchiveWidget.php @@ -64,6 +64,11 @@ class BlogArchiveWidget extends Widget 'Blog' => Blog::class, ]; + /** + * @var string + */ + private static $table_name = 'BlogArchiveWidget'; + /** * {@inheritdoc} */ diff --git a/src/Widgets/BlogCategoriesWidget.php b/src/Widgets/BlogCategoriesWidget.php index 92fe53a..dbd8d9e 100644 --- a/src/Widgets/BlogCategoriesWidget.php +++ b/src/Widgets/BlogCategoriesWidget.php @@ -50,6 +50,11 @@ class BlogCategoriesWidget extends Widget 'Blog' => Blog::class, ]; + /** + * @var string + */ + private static $table_name = 'BlogCategoriesWidget'; + /** * {@inheritdoc} */ diff --git a/src/Widgets/BlogRecentPostsWidget.php b/src/Widgets/BlogRecentPostsWidget.php index 7f0825c..9a3a993 100644 --- a/src/Widgets/BlogRecentPostsWidget.php +++ b/src/Widgets/BlogRecentPostsWidget.php @@ -47,6 +47,11 @@ class BlogRecentPostsWidget extends Widget 'Blog' => Blog::class, ]; + /** + * @var string + */ + private static $table_name = 'BlogRecentPostsWidget'; + /** * {@inheritdoc} */ diff --git a/src/Widgets/BlogTagsCloudWidget.php b/src/Widgets/BlogTagsCloudWidget.php index 00f935c..81885ab 100644 --- a/src/Widgets/BlogTagsCloudWidget.php +++ b/src/Widgets/BlogTagsCloudWidget.php @@ -46,6 +46,11 @@ class BlogTagsCloudWidget extends Widget 'Blog' => Blog::class, ]; + /** + * @var string + */ + private static $table_name = 'BlogTagsCloudWidget'; + /** * {@inheritdoc} */ diff --git a/src/Widgets/BlogTagsWidget.php b/src/Widgets/BlogTagsWidget.php index d1daa20..9994e62 100644 --- a/src/Widgets/BlogTagsWidget.php +++ b/src/Widgets/BlogTagsWidget.php @@ -49,6 +49,11 @@ class BlogTagsWidget extends Widget 'Blog' => Blog::class ]; + /** + * @var string + */ + private static $table_name = 'BlogTagsWidget'; + /** * {@inheritdoc} */