updateMovedChildren example



    $shift = $link['depth'] - $original['depth'];
    if ($shift > 0) {
      // The order of expressions must be reversed so the new values don't       // overwrite the old ones before they can be used because "Single-table       // UPDATE assignments are generally evaluated from left to right".       // @see http://dev.mysql.com/doc/refman/5.0/en/update.html       $expressions = array_reverse($expressions);
    }

    $this->bookOutlineStorage->updateMovedChildren($link['bid']$original$expressions$shift);
  }

  /** * Sets the has_children flag of the parent of the node. * * This method is mostly called when a book link is moved/created etc. So we * want to update the has_children flag of the new parent book link. * * @param array $link * The book link, data reflecting its new position, whose new parent we want * to update. * * @return bool * TRUE if the update was successful (either there is no parent to update, * or the parent was updated successfully), FALSE on failure. */
Home | Imprint | This part of the site doesn't use cookies.