original_string: public function render(array $attributes = [], array $separator = [])
      {
          if (!$this->crumbs) {
              return '';
          }
  
          $crumbs = $this->crumbs;
          $crumbsCount = count($crumbs);
          $templater = $this->templater();
          $separatorString = '';
  
          if ($separator) {
              if (isset($separator['innerAttrs'])) {
                  $separator['innerAttrs'] = $templater->formatAttributes($separator['innerAttrs']);
              }
  
              $separator['attrs'] = $templater->formatAttributes(
                  $separator,
                  ['innerAttrs', 'separator']
              );
  
              $separatorString = $this->formatTemplate('separator', $separator);
          }
  
          $crumbTrail = '';
          foreach ($crumbs as $key => $crumb) {
              $url = $crumb['url'] ? $this->Url->build($crumb['url']) : null;
              $title = $crumb['title'];
              $options = $crumb['options'];
  
              $optionsLink = [];
              if (isset($options['innerAttrs'])) {
                  $optionsLink = $options['innerAttrs'];
                  unset($options['innerAttrs']);
              }
  
              $template = 'item';
              $templateParams = [
                  'attrs' => $templater->formatAttributes($options, ['templateVars']),
                  'innerAttrs' => $templater->formatAttributes($optionsLink),
                  'title' => $title,
                  'url' => $url,
                  'separator' => '',
                  'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : []
              ];
  
              if (!$url) {
                  $template = 'itemWithoutLink';
              }
  
              if ($separatorString && $key !== ($crumbsCount - 1)) {
                  $templateParams['separator'] = $separatorString;
              }
  
              $crumbTrail .= $this->formatTemplate($template, $templateParams);
          }
  
          $crumbTrail = $this->formatTemplate('wrapper', [
              'content' => $crumbTrail,
              'attrs' => $templater->formatAttributes($attributes, ['templateVars']),
              'templateVars' => isset($attributes['templateVars']) ? $attributes['templateVars'] : []
          ]);
  
          return $crumbTrail;
      }
code: public function render(array $attributes = [], array $separator = [])
      {
          if (!$this->crumbs) {
              return '';
          }
  
          $crumbs = $this->crumbs;
          $crumbsCount = count($crumbs);
          $templater = $this->templater();
          $separatorString = '';
  
          if ($separator) {
              if (isset($separator['innerAttrs'])) {
                  $separator['innerAttrs'] = $templater->formatAttributes($separator['innerAttrs']);
              }
  
              $separator['attrs'] = $templater->formatAttributes(
                  $separator,
                  ['innerAttrs', 'separator']
              );
  
              $separatorString = $this->formatTemplate('separator', $separator);
          }
  
          $crumbTrail = '';
          foreach ($crumbs as $key => $crumb) {
              $url = $crumb['url'] ? $this->Url->build($crumb['url']) : null;
              $title = $crumb['title'];
              $options = $crumb['options'];
  
              $optionsLink = [];
              if (isset($options['innerAttrs'])) {
                  $optionsLink = $options['innerAttrs'];
                  unset($options['innerAttrs']);
              }
  
              $template = 'item';
              $templateParams = [
                  'attrs' => $templater->formatAttributes($options, ['templateVars']),
                  'innerAttrs' => $templater->formatAttributes($optionsLink),
                  'title' => $title,
                  'url' => $url,
                  'separator' => '',
                  'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : []
              ];
  
              if (!$url) {
                  $template = 'itemWithoutLink';
              }
  
              if ($separatorString && $key !== ($crumbsCount - 1)) {
                  $templateParams['separator'] = $separatorString;
              }
  
              $crumbTrail .= $this->formatTemplate($template, $templateParams);
          }
  
          $crumbTrail = $this->formatTemplate('wrapper', [
              'content' => $crumbTrail,
              'attrs' => $templater->formatAttributes($attributes, ['templateVars']),
              'templateVars' => isset($attributes['templateVars']) ? $attributes['templateVars'] : []
          ]);
  
          return $crumbTrail;
      }
code_tokens: public function render ( array $ attributes = [ ] , array $ separator = [ ] ) { if ( ! $ this -> crumbs ) { return '' ; } $ crumbs = $ this -> crumbs ; $ crumbsCount = count ( $ crumbs ) ; $ templater = $ this -> templater ( ) ; $ separatorString = '' ; if ( $ separator ) { if ( isset ( $ separator [ 'innerAttrs' ] ) ) { $ separator [ 'innerAttrs' ] = $ templater -> formatAttributes ( $ separator [ 'innerAttrs' ] ) ; } $ separator [ 'attrs' ] = $ templater -> formatAttributes ( $ separator , [ 'innerAttrs' , 'separator' ] ) ; $ separatorString = $ this -> formatTemplate ( 'separator' , $ separator ) ; } $ crumbTrail = '' ; foreach ( $ crumbs as $ key => $ crumb ) { $ url = $ crumb [ 'url' ] ? $ this -> Url -> build ( $ crumb [ 'url' ] ) : null ; $ title = $ crumb [ 'title' ] ; $ options = $ crumb [ 'options' ] ; $ optionsLink = [ ] ; if ( isset ( $ options [ 'innerAttrs' ] ) ) { $ optionsLink = $ options [ 'innerAttrs' ] ; unset ( $ options [ 'innerAttrs' ] ) ; } $ template = 'item' ; $ templateParams = [ 'attrs' => $ templater -> formatAttributes ( $ options , [ 'templateVars' ] ) , 'innerAttrs' => $ templater -> formatAttributes ( $ optionsLink ) , 'title' => $ title , 'url' => $ url , 'separator' => '' , 'templateVars' => isset ( $ options [ 'templateVars' ] ) ? $ options [ 'templateVars' ] : [ ] ] ; if ( ! $ url ) { $ template = 'itemWithoutLink' ; } if ( $ separatorString && $ key !== ( $ crumbsCount - 1 ) ) { $ templateParams [ 'separator' ] = $ separatorString ; } $ crumbTrail .= $ this -> formatTemplate ( $ template , $ templateParams ) ; } $ crumbTrail = $ this -> formatTemplate ( 'wrapper' , [ 'content' => $ crumbTrail , 'attrs' => $ templater -> formatAttributes ( $ attributes , [ 'templateVars' ] ) , 'templateVars' => isset ( $ attributes [ 'templateVars' ] ) ? $ attributes [ 'templateVars' ] : [ ] ] ) ; return $ crumbTrail ; }
docstring: Renders the breadcrumbs trail.
  
  @param array $attributes Array of attributes applied to the `wrapper` template. Accepts the `templateVars` key to
  allow the insertion of custom template variable in the template.
  @param array $separator Array of attributes for the `separator` template.
  Possible properties are :
  - *separator* The string to be displayed as a separator
  - *templateVars* Allows the insertion of custom template variable in the template
  - *innerAttrs* To provide attributes in case your separator is divided in two elements.
  All other properties will be converted as HTML attributes and will replace the *attrs* key in the template.
  If you use the default for this option (empty), it will not render a separator.
  @return string The breadcrumbs trail
docstring_tokens: Renders the breadcrumbs trail .