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);
            }
        }
    }
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);
            }
        }
    }
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 ) ; } } }
Prepare an array of entity items like pages, products etc
@param array $items
@param array $options
Prepare an array of entity items like pages products etc