WebTorque\SilverstripeHelpers\Blocks\AutoPublishElementalExtension
Extends a SiteTree to auto publish all its elemental blocks when the it's published.
You can define the following flag on your class to control this behavior:
* `auto_publish_elemental_disable`: Allows you to disable the auto publishing feature in child classes. Default to
`false`.
Synopsis
class AutoPublishElementalExtension
extends DataExtension
{
- // methods
- public void onAfterVersionedPublish()
- private void autopublish()
- public bool getAutoPublishElementalDisable()
- public void countElement()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Methods
private
- autopublish() — Given a field name, attempt to autopublish all child elements.
public
- countElement()
- getAutoPublishElementalDisable() — Get whatever auto publishing should be disable for this class based off the `auto_publish_elemental_disable` config flag. Default to false.
- onAfterVersionedPublish() — [onAfterWrite description]