original_string: protected function prepareEntityItems(array &$items, $options = array())
      {
          if (!empty($items) && isset($options['entity'])) {
  
              if (!isset($options['view']) || !in_array($options['view'], array('list', 'grid'))) {
                  $options['view'] = 'grid';
              }
  
              $options += array(
                  'entity' => $options['entity'],
                  'entity_id' => array_keys($items),
                  'template_item' => "{$options['entity']}/item/{$options['view']}",
                  'imagestyle' => $this->configTheme("image_style_{$options['entity']}_{$options['view']}", 3)
              );
  
              foreach ($items as &$item) {
                  $this->prepareEntityItem($item, $options);
              }
          }
      }
code: protected function prepareEntityItems(array &$items, $options = array())
      {
          if (!empty($items) && isset($options['entity'])) {
  
              if (!isset($options['view']) || !in_array($options['view'], array('list', 'grid'))) {
                  $options['view'] = 'grid';
              }
  
              $options += array(
                  'entity' => $options['entity'],
                  'entity_id' => array_keys($items),
                  'template_item' => "{$options['entity']}/item/{$options['view']}",
                  'imagestyle' => $this->configTheme("image_style_{$options['entity']}_{$options['view']}", 3)
              );
  
              foreach ($items as &$item) {
                  $this->prepareEntityItem($item, $options);
              }
          }
      }
code_tokens: protected function prepareEntityItems ( array & $ items , $ options = array ( ) ) { if ( ! empty ( $ items ) && isset ( $ options [ 'entity' ] ) ) { if ( ! isset ( $ options [ 'view' ] ) || ! in_array ( $ options [ 'view' ] , array ( 'list' , 'grid' ) ) ) { $ options [ 'view' ] = 'grid' ; } $ options += array ( 'entity' => $ options [ 'entity' ] , 'entity_id' => array_keys ( $ items ) , 'template_item' => "{$options['entity']}/item/{$options['view']}" , 'imagestyle' => $ this -> configTheme ( "image_style_{$options['entity']}_{$options['view']}" , 3 ) ) ; foreach ( $ items as & $ item ) { $ this -> prepareEntityItem ( $ item , $ options ) ; } } }
docstring: Prepare an array of entity items like pages, products etc
  @param array $items
  @param array $options
docstring_tokens: Prepare an array of entity items like pages products etc