/**
  * Returns an array containing the nested set information 
  * for the passed categories and their subcategories 
  * (ordered by their left id).
  *
  * @access  protected
  * @param   array or integer    $categories
  * @return  array                               nested set information
  */
 protected function getNestedSetCategories($categories)
 {
     if (!is_array($categories)) {
         $categories = array(intval($categories));
     }
     $nestedSetCategories = array();
     foreach ($categories as $category) {
         if ($this->categoryExists($category)) {
             if ($category != $this->nestedSetRootId) {
                 $nestedSetCategories[$category] = $this->objNestedSet->pickNode($category, true);
             }
             if ($nodes = $this->objNestedSet->getSubBranch($category, true)) {
                 $nestedSetCategories = $nestedSetCategories + $nodes;
             }
         }
     }
     return $this->sortNestedSetArray($nestedSetCategories);
 }