original_string: public function AllPages($version = null)
      {
          $pages = $this->getManifest()->getPages();
          $output = new ArrayList();
          $baseLink = $this->getDocumentationBaseHref();
  
          foreach ($pages as $url => $page) {
              // Option to skip Pages that do not belong to the current version
              if (!is_null($version) && (string) $page['version'] !== (string) $version) {
                  continue;
              }
  
              $first = strtoupper(trim(substr($page['title'], 0, 1)));
  
              if ($first) {
                  $output->push(
                      new ArrayData(
                          array(
                              'Link'        => Controller::join_links($baseLink, $url),
                              'Title'       => $page['title'],
                              'FirstLetter' => $first
                          )
                      )
                  );
              }
          }
  
          return GroupedList::create($output->sort('Title', 'ASC'));
      }
code: public function AllPages($version = null)
      {
          $pages = $this->getManifest()->getPages();
          $output = new ArrayList();
          $baseLink = $this->getDocumentationBaseHref();
  
          foreach ($pages as $url => $page) {
              // Option to skip Pages that do not belong to the current version
              if (!is_null($version) && (string) $page['version'] !== (string) $version) {
                  continue;
              }
  
              $first = strtoupper(trim(substr($page['title'], 0, 1)));
  
              if ($first) {
                  $output->push(
                      new ArrayData(
                          array(
                              'Link'        => Controller::join_links($baseLink, $url),
                              'Title'       => $page['title'],
                              'FirstLetter' => $first
                          )
                      )
                  );
              }
          }
  
          return GroupedList::create($output->sort('Title', 'ASC'));
      }
code_tokens: public function AllPages ( $ version = null ) { $ pages = $ this -> getManifest ( ) -> getPages ( ) ; $ output = new ArrayList ( ) ; $ baseLink = $ this -> getDocumentationBaseHref ( ) ; foreach ( $ pages as $ url => $ page ) { // Option to skip Pages that do not belong to the current version if ( ! is_null ( $ version ) && ( string ) $ page [ 'version' ] !== ( string ) $ version ) { continue ; } $ first = strtoupper ( trim ( substr ( $ page [ 'title' ] , 0 , 1 ) ) ) ; if ( $ first ) { $ output -> push ( new ArrayData ( array ( 'Link' => Controller :: join_links ( $ baseLink , $ url ) , 'Title' => $ page [ 'title' ] , 'FirstLetter' => $ first ) ) ) ; } } return GroupedList :: create ( $ output -> sort ( 'Title' , 'ASC' ) ) ; }
docstring: Generate a list of all the pages in the documentation grouped by the
  first letter of the page.
  
  @param  string|int|null $version
  @return GroupedList
docstring_tokens: Generate a list of all the pages in the documentation grouped by the first letter of the page .