SilverStripe\Versioned\RecursivePublishable
Provides owns / owned_by and recursive publishing API for all objects.
This extension is added to DataObject by default
Synopsis
class RecursivePublishable
extends DataExtension
{
- // methods
- public bool publishRecursive()
- public void rollbackRelations()
- public bool deleteFromChangeSets()
- public ArrayList findOwned()
- public bool hasOwned()
- public ArrayList findOwners()
- public ArrayList findOwnersRecursive()
- protected array lookupReverseOwners()
- public void unlinkDisownedObjects()
- public void unlinkDisownedRelationship()
- public void onBeforeDuplicate()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Tasks
Line | Task |
---|---|
204 | - Cache this more intelligently |
Members
private
- $owned_by
—
array
Opposing relationship to owns config; Represents the objects which own the current object. - $owns
—
array
List of relationships on this object that are "owned" by this object.
Methods
protected
- lookupReverseOwners() — Find a list of classes, each of which with a list of methods to invoke to lookup owners.
public
- deleteFromChangeSets() — Remove this item from any changesets
- findOwned() — Find all objects owned by the current object.
- findOwners() — Find objects which own this object.
- findOwnersRecursive() — Find objects which own this object.
- hasOwned() — Returns true if the record has any owned relationships that exist
- onBeforeDuplicate() — If `cascade_duplications` is empty, default to `owns` config
- publishRecursive() — Publish this object and all owned objects to Live
- rollbackRelations() — Rollback all related objects on this stage.
- unlinkDisownedObjects() — Set foreign keys of has_many objects to 0 where those objects were disowned as a result of a partial publish / unpublish.
- unlinkDisownedRelationship() — Unlink an object with a specific named relationship against the owner.