Skip to content

Commit 4cf1fc2

Browse files
committed
Add config database entries for blog categories
1 parent 13ce75d commit 4cf1fc2

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

Api/Data/SiteInterface.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface SiteInterface extends ExtensibleDataInterface
1717
const API_PASSWORD = 'api_password';
1818
const REPLACE_MEDIA_URLS = 'replace_media_urls';
1919
const ENABLE_BLOG = 'enable_blog';
20+
const ENABLE_BLOG_CATEGORIES = 'enable_blog_categories';
2021
const BLOG_PREFIX = 'blog_prefix';
2122
const BLOG_STORES = 'blog_stores';
2223

@@ -137,6 +138,19 @@ public function getEnableBlog(): ?bool;
137138
*/
138139
public function setEnableBlog(?bool $enableBlog);
139140

141+
/**
142+
* Get enable_blog_catgories
143+
* @return bool
144+
*/
145+
public function getEnableBlogCategories(): ?bool;
146+
147+
/**
148+
* Set enable_blog
149+
* @param bool $enableBlogCategories
150+
* @return SiteInterface
151+
*/
152+
public function setEnableBlogCategories(?bool $enableBlogCategories);
153+
140154
/**
141155
* Get blog_prefix
142156
* @return string

Model/Data/Site.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,26 @@ public function setEnableBlog($enableBlog)
181181
return $this->setData(self::ENABLE_BLOG, $enableBlog);
182182
}
183183

184+
/**
185+
* Get enable_blog_catgories
186+
* @return bool
187+
*/
188+
public function getEnableBlogCategories(): ?bool
189+
{
190+
return (bool) $this->_get(self::ENABLE_BLOG_CATEGORIES);
191+
}
192+
193+
/**
194+
* Set enable_blog
195+
* @param bool $enableBlogCategories
196+
* @return SiteInterface
197+
*/
198+
public function setEnableBlogCategories(?bool $enableBlogCategories)
199+
{
200+
return $this->setData(self::ENABLE_BLOG_CATEGORIES, $enableBlogCategories);
201+
}
202+
203+
184204
/**
185205
* Get blog_prefix
186206
* @return string

etc/db_schema.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<column length="255" name="api_password" nullable="true" xsi:type="varchar"/>
1616
<column default="0" name="replace_media_urls" nullable="false" xsi:type="boolean"/>
1717
<column default="0" name="enable_blog" nullable="false" xsi:type="boolean"/>
18+
<column default="0" name="enable_blog_categories" nullable="false" xsi:type="boolean"/>
1819
<column length="255" name="blog_prefix" nullable="true" xsi:type="varchar"/>
1920
<column length="255" name="blog_stores" nullable="false" xsi:type="varchar"/>
2021
</table>

0 commit comments

Comments
 (0)