public function infinitescroll($entities, $config = array())
    {
        $config = array_merge(array(
            'entities' => (isset($entities)) ? $entities : null,
            'filter' => null,
            'entity_type' => (isset($entities)) ? $entities->getIdentifier()->name : null,
            'id' => null,
            'columns' => 2,
            'layout_list' => 'default',
            'layout_item' => 'list',
            'start' => 0,
            'limit' => 20,
            'hiddenlink' => false,
        ), $config);

        $config = array_merge(array(
            'url' => array(
                'layout' => 'list',
                'start' => $config['start'],
                'limit' => $config['limit'])
        ), $config);

        return $this->_render('infinitescroll', $config);
    }
public function infinitescroll($entities, $config = array())
    {
        $config = array_merge(array(
            'entities' => (isset($entities)) ? $entities : null,
            'filter' => null,
            'entity_type' => (isset($entities)) ? $entities->getIdentifier()->name : null,
            'id' => null,
            'columns' => 2,
            'layout_list' => 'default',
            'layout_item' => 'list',
            'start' => 0,
            'limit' => 20,
            'hiddenlink' => false,
        ), $config);

        $config = array_merge(array(
            'url' => array(
                'layout' => 'list',
                'start' => $config['start'],
                'limit' => $config['limit'])
        ), $config);

        return $this->_render('infinitescroll', $config);
    }
public function infinitescroll ( $ entities , $ config = array ( ) ) { $ config = array_merge ( array ( 'entities' => ( isset ( $ entities ) ) ? $ entities : null , 'filter' => null , 'entity_type' => ( isset ( $ entities ) ) ? $ entities -> getIdentifier ( ) -> name : null , 'id' => null , 'columns' => 2 , 'layout_list' => 'default' , 'layout_item' => 'list' , 'start' => 0 , 'limit' => 20 , 'hiddenlink' => false , ) , $ config ) ; $ config = array_merge ( array ( 'url' => array ( 'layout' => 'list' , 'start' => $ config [ 'start' ] , 'limit' => $ config [ 'limit' ] ) ) , $ config ) ; return $ this -> _render ( 'infinitescroll' , $ config ) ; }
Renders an InfinitScroll and Masonry layout if there are more than one columns

@param an entity set extended from AnDomainEntitysetAbstract class
@param array of configs

@return html
Renders an InfinitScroll and Masonry layout if there are more than one columns