\core\admin\content\service\PostService.php
Podium CMS http://code.google.com/p/podium/
Copyright (C) 2011-2012 Martin Cassidy martin.cassidy@webquub.com
Podium CMS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Podium CMS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the General Public License for more details.
You should have received a copy of the GNU General Public License along with Podium CMS. If not, see http://www.gnu.org/licenses/.
\PostService
Implementation of the post service
- Implements
- \IPostService
- Author
- Martin Cassidy
- Service
Properties
Methods

checkNameExists(
string $name, int $id
=
null
)
:
booleanChecks whether the post name exists, ensuring it is not itself
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $id | int | The id of the post (if it exists) |
| Type | Description |
|---|---|
| boolean |

createOrUpdatePost(
\Post $post
)
:
voidCreate the post if it does exist already, updated otherwise
| Name | Type | Description |
|---|---|---|
| $post | \Post |

getPostByContentType(
$typeId
)
:
voidGet all the posts for a content type
| Name | Type | Description |
|---|---|---|
| $typeId |

getPosts(
int $start, int $count
)
:
arrayGet an array of posts
| Name | Type | Description |
|---|---|---|
| $start | int | |
| $count | int |
| Type | Description |
|---|---|
| array |