replaced by a repository service later):
$updater = $page->newPageUpdater( $user );
- $updater->setContent( 'main', $content );
+ $updater->setContent( SlotRecord::MAIN, $content );
$updater->setRcPatrolStatus( RecentChange::PRC_PATROLLED );
$newRev = $updater->saveRevision( $comment );
$updater = $page->newPageUpdater( $user );
$parent = $updater->grabParentRevision();
- $content = $parent->getContent( 'main' )->replaceSection( $section, $sectionContent );
- $updater->setContent( 'main', $content );
+ $content = $parent->getContent( SlotRecord::MAIN )->replaceSection( $section, $sectionContent );
+ $updater->setContent( SlotRecord::MAIN, $content );
$newRev = $updater->saveRevision( $comment, EDIT_UPDATE );
In both cases, all secondary updates will be triggered automatically.