original_string: public function listSideMenuItems($owner = null, $code = null)
      {
          $activeItem = null;
  
          if ($owner !== null && $code !== null) {
              $activeItem = @$this->items[$this->makeItemKey($owner, $code)];
          } else {
              foreach ($this->listMainMenuItems() as $item) {
                  if ($this->isMainMenuItemActive($item)) {
                      $activeItem = $item;
                      break;
                  }
              }
          }
  
          if (!$activeItem) {
              return [];
          }
  
          $items = $activeItem->sideMenu;
  
          foreach ($items as $item) {
              if ($item->counter !== null && is_callable($item->counter)) {
                  $item->counter = call_user_func($item->counter, $item);
              }
          }
  
          return $items;
      }
code: public function listSideMenuItems($owner = null, $code = null)
      {
          $activeItem = null;
  
          if ($owner !== null && $code !== null) {
              $activeItem = @$this->items[$this->makeItemKey($owner, $code)];
          } else {
              foreach ($this->listMainMenuItems() as $item) {
                  if ($this->isMainMenuItemActive($item)) {
                      $activeItem = $item;
                      break;
                  }
              }
          }
  
          if (!$activeItem) {
              return [];
          }
  
          $items = $activeItem->sideMenu;
  
          foreach ($items as $item) {
              if ($item->counter !== null && is_callable($item->counter)) {
                  $item->counter = call_user_func($item->counter, $item);
              }
          }
  
          return $items;
      }
code_tokens: public function listSideMenuItems ( $ owner = null , $ code = null ) { $ activeItem = null ; if ( $ owner !== null && $ code !== null ) { $ activeItem = @ $ this -> items [ $ this -> makeItemKey ( $ owner , $ code ) ] ; } else { foreach ( $ this -> listMainMenuItems ( ) as $ item ) { if ( $ this -> isMainMenuItemActive ( $ item ) ) { $ activeItem = $ item ; break ; } } } if ( ! $ activeItem ) { return [ ] ; } $ items = $ activeItem -> sideMenu ; foreach ( $ items as $ item ) { if ( $ item -> counter !== null && is_callable ( $ item -> counter ) ) { $ item -> counter = call_user_func ( $ item -> counter , $ item ) ; } } return $ items ; }
docstring: Returns a list of side menu items for the currently active main menu item.
  The currently active main menu item is set with the setContext methods.
docstring_tokens: Returns a list of side menu items for the currently active main menu item . The currently active main menu item is set with the setContext methods .