Migration::publish
Simplifies publishing of an actual page instance (since migrations are run from command line).
Signature
public function publish(SiteTree
$page,
[boolean
$force = true] )
Parameters
$page
—
SiteTree
$force
—
boolean
- If set to false, will not publish if the page has a draft version to prevent
accidentally publishing a draft page.
TODO: Possibly change default for $force to false, but will need to start versioning this module to help prevent issues with backward compatibility.
Errors/Exceptions
-
MigrationException