\core\admin\content\service\PostService.php

Show: inherited
Table of Contents

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

Package: Default

Implementation of the post service

Implements
\IPostService
Author
Martin Cassidy  
Service
 

Properties

Propertyprivate  $contentDao= ''

Details
Type
Resource
 
Propertyprivate  $contentTypeService= ''

Details
Type
Resource
 
Propertyprivate  $postDao= ''

Details
Type
Resource
 
Propertyprivate  $widgetService= ''

Details
Type
Resource
 

Methods

methodpubliccheckNameExists( string $name, int $id = null ) : boolean

Checks whether the post name exists, ensuring it is not itself

Parameters
Name Type Description
$name string
$id int

The id of the post (if it exists)

Returns
Type Description
boolean
methodpubliccreateOrUpdatePost( \Post $post ) : void

Create the post if it does exist already, updated otherwise

Parameters
Name Type Description
$post \Post
methodpublicdeletePost( \Post $post ) : void

Delete the given post

Parameters
Name Type Description
$post \Post
methodpublicgetPost( int $postId ) : \PopulatedPost

Get a post by its id

Parameters
Name Type Description
$postId int
Returns
Type Description
\PopulatedPost
methodpublicgetPostByContentType(  $typeId ) : void

Get all the posts for a content type

Parameters
Name Type Description
$typeId
methodpublicgetPostSize( ) : int

Get the total number of posts

Returns
Type Description
int
methodpublicgetPosts( int $start, int $count ) : array

Get an array of posts

Parameters
Name Type Description
$start int
$count int
Returns
Type Description
array
methodpublicpreparePopulatedPost( \Post $post ) : void

Prepare a post by replacing its simple domain values with full populated versions

Parameters
Name Type Description
$post \Post
Documentation was generated by DocBlox 0.15.1.