original_string: protected function find_categories_after($category) {
          $return = array();
          $categoryarray = $this->categories;
          foreach ($categoryarray as $categoryelement) {
              if ($categoryelement->after == $category->name) {
                  // Find all categories that comes after this category as well.
                  $categoryelement->sort_nodes();
                  $return = array_merge($return, array($categoryelement->name => $categoryelement),
                          $this->find_categories_after($categoryelement));
              }
          }
          return $return;
      }
code: protected function find_categories_after($category) {
          $return = array();
          $categoryarray = $this->categories;
          foreach ($categoryarray as $categoryelement) {
              if ($categoryelement->after == $category->name) {
                  // Find all categories that comes after this category as well.
                  $categoryelement->sort_nodes();
                  $return = array_merge($return, array($categoryelement->name => $categoryelement),
                          $this->find_categories_after($categoryelement));
              }
          }
          return $return;
      }
code_tokens: protected function find_categories_after ( $ category ) { $ return = array ( ) ; $ categoryarray = $ this -> categories ; foreach ( $ categoryarray as $ categoryelement ) { if ( $ categoryelement -> after == $ category -> name ) { // Find all categories that comes after this category as well. $ categoryelement -> sort_nodes ( ) ; $ return = array_merge ( $ return , array ( $ categoryelement -> name => $ categoryelement ) , $ this -> find_categories_after ( $ categoryelement ) ) ; } } return $ return ; }
docstring: Find all category nodes that should be displayed after a given a category node.
  
  @param category $category category object
  
  @return category[] array of category objects
  @throws \coding_exception
docstring_tokens: Find all category nodes that should be displayed after a given a category node .