original_string: protected function prepareLinks()
      {
          $links = [];
          if ($this->homeLink === null) {
              $links[] = $this->renderItem([
                  'label' => Yii::t('yii', 'Home'),
                  'url' => Yii::$app->homeUrl,
              ], $this->itemTemplate);
          } elseif ($this->homeLink !== false) {
              $links[] = $this->renderItem($this->homeLink, $this->itemTemplate);
          }
  
          foreach ($this->links as $link) {
              if (!is_array($link)) {
                  $link = ['label' => $link];
              }
              $links[] = $this->renderItem($link, isset($link['url']) ? $this->itemTemplate : $this->activeItemTemplate);
          }
  
          return $links;
      }
code: protected function prepareLinks()
      {
          $links = [];
          if ($this->homeLink === null) {
              $links[] = $this->renderItem([
                  'label' => Yii::t('yii', 'Home'),
                  'url' => Yii::$app->homeUrl,
              ], $this->itemTemplate);
          } elseif ($this->homeLink !== false) {
              $links[] = $this->renderItem($this->homeLink, $this->itemTemplate);
          }
  
          foreach ($this->links as $link) {
              if (!is_array($link)) {
                  $link = ['label' => $link];
              }
              $links[] = $this->renderItem($link, isset($link['url']) ? $this->itemTemplate : $this->activeItemTemplate);
          }
  
          return $links;
      }
code_tokens: protected function prepareLinks ( ) { $ links = [ ] ; if ( $ this -> homeLink === null ) { $ links [ ] = $ this -> renderItem ( [ 'label' => Yii :: t ( 'yii' , 'Home' ) , 'url' => Yii :: $ app -> homeUrl , ] , $ this -> itemTemplate ) ; } elseif ( $ this -> homeLink !== false ) { $ links [ ] = $ this -> renderItem ( $ this -> homeLink , $ this -> itemTemplate ) ; } foreach ( $ this -> links as $ link ) { if ( ! is_array ( $ link ) ) { $ link = [ 'label' => $ link ] ; } $ links [ ] = $ this -> renderItem ( $ link , isset ( $ link [ 'url' ] ) ? $ this -> itemTemplate : $ this -> activeItemTemplate ) ; } return $ links ; }
docstring: Generates all breadcrumb links and sets active states.
  @return array all processed items
  @uses [[renderItem]]
  @throws InvalidConfigException
docstring_tokens: Generates all breadcrumb links and sets active states .