\ContentChangeset
A dataobject that represents a changeset of pages in the system (ideally we'll support other content types, but for now only sitetree objects support publishing....)
A changeset is created anytime someone starts editing content. When that content is saved, it is added to the
user's current changeset (a new one is created if they don't have one). This allows items to be submitted all at once
When an item is added to a changeset, a representative object (ContentChangesetItem) is added so that we can store
objects of any type in the changeset.
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
Synopsis
class ContentChangeset
extends DataObject
{
- // members
- public static array $db = ;
- public static array $has_one = ;
- public static array $has_many = ;
- public static string $default_sort = 'LastEdited DESC';
- public static array $summary_fields = ;
- public static array $dependencies = ;
- public ChangesetService $changesetService;
- // methods
- public void getCMSFields()
- public void getItems()
- public void changesetItemFor()
- public void remove()
- public void addItem()
- public void revert()
- public void submit()
- public void revertAll()
- public void unlock()
- public void lock()
- public void canView()
- public void canEdit()
- public void canDelete()
Hierarchy
Extends
- DataObject
Members
public
- $changesetService — ChangesetService
- $db
- $default_sort
- $dependencies
- $has_many
- $has_one
- $summary_fields
Methods
public
- addItem() — Add an object to the changeset
- canDelete()
- canEdit()
- canView()
- changesetItemFor() — Get the content changeset item for a particular object for THIS changeset
- getCMSFields()
- getItems() — We want to first get all our changesetitems and retrieve the objects for those
- lock()
- remove() — Removes an item from a changeset. This typically occurs when a piece of content has been forcibly published by an admin user. This is NOT the same as reverting the content - though the consequences may be similar (ie the changeset is set to 'inactive'
- revert() — Remove an object from a changeset
- revertAll() — Reverts an entire changeset
- submit() — Submit changeset to the published site
- unlock()