original_string: protected function getUriById( $paragraphId, $absolute = false )
      {
          /* @var $model \Grid\Paragraph\Model\Paragraph\Model */
          $service    = $this->getServiceLocator();
          $model      = $service->get( 'Grid\Paragraph\Model\Paragraph\Model' );
          $paragraph  = $model->find( $paragraphId );
  
          if ( empty( $paragraph ) )
          {
              return '#error-paragraph-notFound:' . $paragraphId;
          }
  
          if ( 'content' == $paragraph->type )
          {
              return $this->getUriForContent( $this->contentId, $absolute );
          }
  
          if ( $paragraph->id == $paragraph->rootId )
          {
              return $this->getFallbackUri( $paragraphId, $absolute );
          }
  
          return $this->getUriById( $paragraph->rootId, $absolute )
               . '#paragraph-' . $paragraph->id;
      }
code: protected function getUriById( $paragraphId, $absolute = false )
      {
          /* @var $model \Grid\Paragraph\Model\Paragraph\Model */
          $service    = $this->getServiceLocator();
          $model      = $service->get( 'Grid\Paragraph\Model\Paragraph\Model' );
          $paragraph  = $model->find( $paragraphId );
  
          if ( empty( $paragraph ) )
          {
              return '#error-paragraph-notFound:' . $paragraphId;
          }
  
          if ( 'content' == $paragraph->type )
          {
              return $this->getUriForContent( $this->contentId, $absolute );
          }
  
          if ( $paragraph->id == $paragraph->rootId )
          {
              return $this->getFallbackUri( $paragraphId, $absolute );
          }
  
          return $this->getUriById( $paragraph->rootId, $absolute )
               . '#paragraph-' . $paragraph->id;
      }
code_tokens: protected function getUriById ( $ paragraphId , $ absolute = false ) { /* @var $model \Grid\Paragraph\Model\Paragraph\Model */ $ service = $ this -> getServiceLocator ( ) ; $ model = $ service -> get ( 'Grid\Paragraph\Model\Paragraph\Model' ) ; $ paragraph = $ model -> find ( $ paragraphId ) ; if ( empty ( $ paragraph ) ) { return '#error-paragraph-notFound:' . $ paragraphId ; } if ( 'content' == $ paragraph -> type ) { return $ this -> getUriForContent ( $ this -> contentId , $ absolute ) ; } if ( $ paragraph -> id == $ paragraph -> rootId ) { return $ this -> getFallbackUri ( $ paragraphId , $ absolute ) ; } return $ this -> getUriById ( $ paragraph -> rootId , $ absolute ) . '#paragraph-' . $ paragraph -> id ; }
docstring: Get uri by id
  
  @param   int     $paragraphId
  @param   bool    $absolute
  @return  string
docstring_tokens: Get uri by id