Handles publication of blog entries, including updates and deletions.
public function keepEditHistory( |
| ) |
Set or get whether publication should retain edit history.
val | Boolean for whether to turn on edit history or null for fetch. |
True if edit history is on, false otherwise.
public function publishArticle( |
| ) |
Publish the entry as an article.
Same as publishEntry(), but publishes the entry as an article outside of the normal blog listing structure. Throws on failure.
entry | (BlogEntry) The entry to publish |
time DateTime$ | (DateTime) Optional publication time, default is now. |
Exception or EntryRenameFailed
public function unpublish( |
| ) |
Unpublish the entry.
Moves the entry from a published blog entry or article to an unpublished draft entry. Throws on failure or if the entry is not published.
entry | (BlogEntry) The entry to unpublish |
Exception or EntryRenameFailed
public function createDraft( |
| ) |
Save the entry as a new draft.
Saves a new entry in the drafts folder. Throws on failure or if the entry already exists.
entry | (BlogEntry) The entry to persist as a draft. |
time DateTime$ | (DateTime) Optional creation time |
CouldNotCreateDirectory or EntryAlreadyExists or EntryWriteFailed
public function update( |
| ) |
Update an existing entry on disk.
Writes out the state of the entry without changing its publication status. Throws if the update fails or the entry does not already exist.
entry | (BlogEntry) The entry to update. |
time DateTime$ | (DateTime) The optional time when the entry is updated. |
EntryDoesNotExist or EntryWriteFailed or EntryRenameFailed
public function delete( |
| ) |
Completely delete an entry.
Applies to both published and draft entries. Throws on failure of if the entry has not been saved.
entry | (BlogEntry) The entry to delete. |
time DateTime$ | (DateTime) The optional deletion time, used for history. |
EntryDoesNotExist or EntryDeleteFailed