\AutoArchivableExtension
Class AutoArchivableExtension
Synopsis
class AutoArchivableExtension
extends DataExtension
{
- // methods
- public void updateSummaryFields()
- public void updateCMSFields()
- public void AutoArchiveOn()
- public void onBeforeWrite()
- public bool Archive()
- private void RunArchiveQuery()
- public null|SiteTree getDestination()
- private ArrayList AllDestinations()
- public static array getExtendedClasses()
Hierarchy
Extends
- DataExtension
Members
private
- $db
- $has_one
Methods
private
- AllDestinations() — Returns a list of all SiteTree objects that are suitable to be parents for $this->owner when it gets archived.
- RunArchiveQuery() — TODO: Rewrite this. Should not use a custom query. It's now made this way because I do not know a better way to make these changes to both the staged and live versions without the CMS yelling that the moved page has unpublished changes even when it actually does not have. Still, this is not a good way to solve this. For example, this skips version history completely.
public
- Archive() — Finds a suitable destination page for this archivable page and moves it there.
- AutoArchiveOn()
- getDestination() — Finds a page under which this page will be moved when archived.
- getExtendedClasses() — Find out which classes are extended by this extension.
- onBeforeWrite()
- updateCMSFields()
- updateSummaryFields()