/** * Returns the changeSet data when a section has been moved. * * @param Section $oldParent * @param int $oldLeft * @param Section $newParent * * @return array $changeSet */ public function getMoveEventChangeSet(Section $oldParent, $oldLeft, Section $newParent) { /* Create change set for move log event * If section's parent has changed, return old and new parent * Otherwise return old and new left to mark move up or down in the same parent */ $newLeft = $this->getLeft(); $changeSet = array('parentId' => array($oldParent->getId(), $newParent->getId()), 'parentName' => array($oldParent->getActiveContribution()->getTitle(), $newParent->getActiveContribution()->getTitle()), 'isParentRoot' => array($oldParent->isRoot(), $newParent->isRoot()), 'left' => array($oldLeft, $newLeft)); return $changeSet; }