original_string: protected function renderItems(array $items, $type, $sorted = true)
      {
          if ($sorted) {
              static::sortItems($items);
          }
  
          return array_map(function ($item) use ($type)
          {
              $asset = Arr::get($item, 'asset');
  
              //
              $mode = Arr::get($item, 'mode', 'default');
  
              if ($mode === 'inline') {
                  $asset = sprintf("\n%s\n", trim($asset));
              }
  
              // The 'view' mode is a specialized 'inline'
              else if ($mode === 'view') {
                  $mode = 'inline';
  
                  $asset = $this->views->fetch($asset);
              }
  
              $template = Arr::get(static::$templates, "${mode}.${type}");
  
              return sprintf($template, $asset);
  
          }, $items);
      }
code: protected function renderItems(array $items, $type, $sorted = true)
      {
          if ($sorted) {
              static::sortItems($items);
          }
  
          return array_map(function ($item) use ($type)
          {
              $asset = Arr::get($item, 'asset');
  
              //
              $mode = Arr::get($item, 'mode', 'default');
  
              if ($mode === 'inline') {
                  $asset = sprintf("\n%s\n", trim($asset));
              }
  
              // The 'view' mode is a specialized 'inline'
              else if ($mode === 'view') {
                  $mode = 'inline';
  
                  $asset = $this->views->fetch($asset);
              }
  
              $template = Arr::get(static::$templates, "${mode}.${type}");
  
              return sprintf($template, $asset);
  
          }, $items);
      }
code_tokens: protected function renderItems ( array $ items , $ type , $ sorted = true ) { if ( $ sorted ) { static :: sortItems ( $ items ) ; } return array_map ( function ( $ item ) use ( $ type ) { $ asset = Arr :: get ( $ item , 'asset' ) ; // $ mode = Arr :: get ( $ item , 'mode' , 'default' ) ; if ( $ mode === 'inline' ) { $ asset = sprintf ( "\n%s\n" , trim ( $ asset ) ) ; } // The 'view' mode is a specialized 'inline' else if ( $ mode === 'view' ) { $ mode = 'inline' ; $ asset = $ this -> views -> fetch ( $ asset ) ; } $ template = Arr :: get ( static :: $ templates , "${mode}.${type}" ) ; return sprintf ( $ template , $ asset ) ; } , $ items ) ; }
docstring: Render the given position items to an array of assets.
  
  @param  array $items
  @param string $type
  @param bool $sorted
  
  @return array
docstring_tokens: Render the given position items to an array of assets .