Plentymarkets interface documentation
Blog
Contracts
BlogPostRepositoryContract
This interface provides methods to create, read, list, update and delete blog posts
Namespace
Plenty\Modules\Blog\Contracts
Methods
public createPost($data):Plenty\Modules\Blog\Models\BlogPost
Return type: BlogPost
Creates a new blog post.
Name |
Type |
Description |
|
Blog post data |
public getPost($blogPostId):Plenty\Modules\Blog\Models\BlogPost
Return type: BlogPost
Get a single blog post by its ID
Name |
Type |
Description |
|
public listPosts($page = 1, $itemsPerPage = 50, $filters = []):array
Lists all blog posts for current plenty ID.
Name |
Type |
Description |
|
||
|
||
|
public updatePost($data, $blogPostId):Plenty\Modules\Blog\Models\BlogPost
Return type: BlogPost
Update data for a post
Name |
Type |
Description |
|
||
|
public deletePost($blogPostId):void
Delete a single blog post by its ID
Name |
Type |
Description |
|
public migratePosts($data = []):void
Migrate old posts to new
Name |
Type |
Description |
|
public getOldPostById($id):void
Get old blog post by its ID
Name |
Type |
Description |
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Services
BlogPluginService
The blog plugin service
Namespace
Plenty\Modules\Blog\Services
Methods
public getPluginSetIdFromConfig():void
Get the ID of the plugin set.
public findCategoryByUrl($level1, $level2 = null, $level3 = null, $level4 = null, $level5 = null, $level6 = null, $webstoreId = null, $lang = null):void
Get the category by URL.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|