WebbuildersGroup\VersionedHelpers\Extensions\StagedManyManyRelationExtension
Class \WebbuildersGroup\VersionedHelpers\Extensions\StagedManyManyRelationExtension
Synopsis
class StagedManyManyRelationExtension
extends DataExtension
{
- // constants
- const QUERY_CLEANUP_ROLLBACK = 'QUERY_TYPE_CLEANUP_TASK_ROLLBACK';
- const QUERY_CLEANUP_UNPUBLISH = 'QUERY_TYPE_CLEANUP_UNPUBLISH';
- const QUERY_CLEANUP_PUBLISH = 'QUERY_TYPE_CLEANUP_PUBLISH';
- const QUERY_DIFFER_DATA_FETCH = 'QUERY_TYPE_DIFFER_DATA_FETCH';
- // members
- private static boolean $disabled = false;
- protected array $_joinTables = ;
- // methods
- public void __construct()
- public void setOwner()
- public bool stagesDiffer()
- public bool isModifiedOnDraft()
- public void updateManyManyComponents()
- public void onAfterPublish()
- public void onAfterRollback()
- public void onAfterRollbackRecursive()
- public void onAfterUnpublish()
- public static void disable()
- public static void enable()
- public static bool get_enabled()
- protected array foreignIDFilter()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Constants
Name | Value |
---|---|
QUERY_CLEANUP_ROLLBACK | 'QUERY_TYPE_CLEANUP_TASK_ROLLBACK' |
QUERY_CLEANUP_UNPUBLISH | 'QUERY_TYPE_CLEANUP_UNPUBLISH' |
QUERY_CLEANUP_PUBLISH | 'QUERY_TYPE_CLEANUP_PUBLISH' |
QUERY_DIFFER_DATA_FETCH | 'QUERY_TYPE_DIFFER_DATA_FETCH' |
Members
private
- $disabled
protected
- $_joinTables
Methods
protected
- foreignIDFilter() — Return a filter expression for when getting the contents of the relationship for some foreign ID
public
- __construct() — Constructor
- disable() — Disables the Staged Many Many Relation Modifier
- enable() — Enables the Staged Many Many Relation Modifier
- get_enabled() — Gets whether the Staged Many Many Relation Modifier is enabled or not
- isModifiedOnDraft() — Wrapper for StagedManyManyRelationExtension::stagesDiffer()
- onAfterPublish() — Handles publishing the versioned many_many relationships
- onAfterRollback() — Handles reverting the relationship to live
- onAfterRollbackRecursive() — Handles reverting the relationship to live
- onAfterUnpublish() — Removes the items from the live relationship after unpublishing
- setOwner() — Set the owner of this extension
- stagesDiffer() — Compare two stages to see if they're different. Only checks the ID's match, not the actual content.
- updateManyManyComponents() — Handles versioning of the many_many relations