Swat/SwatTileView.php
public function displayTiles()
    {
        // this uses read-ahead iteration

        $this->model->rewind();
        $record = $this->model->valid() ? $this->model->current() : null;

        $this->model->next();
        $next_record = $this->model->valid() ? $this->model->current() : null;

        // tile count used for tiles-per-row option
        $count = 1;

        while ($record !== null) {
            ob_start();
            $this->displayTileGroupHeaders($record, $next_record);
            $group_headers = ob_get_clean();

            echo $group_headers;

            // if group headers are displayed, reset tiles-per-row count
            if ($group_headers != '') {
                $count = 1;
            }

            $this->displayTile($record, $next_record);

            // clear tiles-per-row
            if (
                $this->tiles_per_row !== null &&
                $count % $this->tiles_per_row === 0
            ) {
                echo '<div class="swat-tile-view-clear"></div>';
            }

            ob_start();
            $this->displayTileGroupFooters($record, $next_record);
            $group_footers = ob_get_clean();

            echo $group_footers;

            // if group footers are displayed, reset tiles-per-row-count,
            // otherwise, increase tiles-per-row-count
            if ($group_footers != '') {
                $count = 1;
            } else {
                $count++;
            }

            // get next record
            $record = $next_record;
            $this->model->next();
            $next_record = $this->model->valid()
                ? $this->model->current()
                : null;
        }
    }
public function displayTiles()
    {
        // this uses read-ahead iteration

        $this->model->rewind();
        $record = $this->model->valid() ? $this->model->current() : null;

        $this->model->next();
        $next_record = $this->model->valid() ? $this->model->current() : null;

        // tile count used for tiles-per-row option
        $count = 1;

        while ($record !== null) {
            ob_start();
            $this->displayTileGroupHeaders($record, $next_record);
            $group_headers = ob_get_clean();

            echo $group_headers;

            // if group headers are displayed, reset tiles-per-row count
            if ($group_headers != '') {
                $count = 1;
            }

            $this->displayTile($record, $next_record);

            // clear tiles-per-row
            if (
                $this->tiles_per_row !== null &&
                $count % $this->tiles_per_row === 0
            ) {
                echo '<div class="swat-tile-view-clear"></div>';
            }

            ob_start();
            $this->displayTileGroupFooters($record, $next_record);
            $group_footers = ob_get_clean();

            echo $group_footers;

            // if group footers are displayed, reset tiles-per-row-count,
            // otherwise, increase tiles-per-row-count
            if ($group_footers != '') {
                $count = 1;
            } else {
                $count++;
            }

            // get next record
            $record = $next_record;
            $this->model->next();
            $next_record = $this->model->valid()
                ? $this->model->current()
                : null;
        }
    }
public function displayTiles ( ) { // this uses read-ahead iteration $ this -> model -> rewind ( ) ; $ record = $ this -> model -> valid ( ) ? $ this -> model -> current ( ) : null ; $ this -> model -> next ( ) ; $ next_record = $ this -> model -> valid ( ) ? $ this -> model -> current ( ) : null ; // tile count used for tiles-per-row option $ count = 1 ; while ( $ record !== null ) { ob_start ( ) ; $ this -> displayTileGroupHeaders ( $ record , $ next_record ) ; $ group_headers = ob_get_clean ( ) ; echo $ group_headers ; // if group headers are displayed, reset tiles-per-row count if ( $ group_headers != '' ) { $ count = 1 ; } $ this -> displayTile ( $ record , $ next_record ) ; // clear tiles-per-row if ( $ this -> tiles_per_row !== null && $ count % $ this -> tiles_per_row === 0 ) { echo '<div class="swat-tile-view-clear"></div>' ; } ob_start ( ) ; $ this -> displayTileGroupFooters ( $ record , $ next_record ) ; $ group_footers = ob_get_clean ( ) ; echo $ group_footers ; // if group footers are displayed, reset tiles-per-row-count, // otherwise, increase tiles-per-row-count if ( $ group_footers != '' ) { $ count = 1 ; } else { $ count ++ ; } // get next record $ record = $ next_record ; $ this -> model -> next ( ) ; $ next_record = $ this -> model -> valid ( ) ? $ this -> model -> current ( ) : null ; } }
Displays the tiles of this tile view
Displays the tiles of this tile view