Sorts the page index according to page order

@return void
505336
protected function _sort()
        {
            if ($this->_dirtyIndex) {
                $newIndex = array();
                $index = 0;

                foreach ($this->_pages as $hash => $page) {
                    $order = $page->getOrder();
                    if ($order === null) {
                        $newIndex[$hash] = $index;
                        $index++;
                    } else {
                        $newIndex[$hash] = $order;
                    }
                }

                asort($newIndex);

                $this->_index = $newIndex;
                $this->_dirtyIndex = false;
            }
        }
272935
public function getPageOrderInstance()
    {
        if ($this->pageOrder === null) {
            $this->pageOrder = new PageOrderImpl($this);
        }
        return $this->pageOrder;
    }
142016
public function index()
    {
        return $this->render('index', [
            'pages' => $this->model->getNavItemPageBlockItems()->select(['nav_item_page_id'])->distinct()->orderBy([])->all(),
        ]);
    }
708713
public function indexOrder($order_id)
    {
        $this->setOrder($order_id);
        $this->submitIndexOrder();
        $this->setTitleIndexOrder();
        $this->setBreadcrumbIndexOrder();

        $this->setData('order', $this->data_order);

        $this->setDataPanelLogsIndexOrder();
        $this->setDataPanelSummaryIndexOrder();
        $this->setDataPanelCommentIndexOrder();
        $this->setDataPanelCustomerIndexOrder();
        $this->setDataPanelComponentsIndexOrder();
        $this->setDataPanelPaymentAddressIndexOrder();
        $this->setDataPanelShippingAddressIndexOrder();

        $this->outputIndexOrder();
    }
265305
public function index() {

		$this->AfipFactura->recursive = 0;
		$this->AfipFactura->contain(array(
				'Mesa' => array(
					'Cliente' => array(
						'TipoDocumento', 
						'IvaResponsabilidad'
						), 
					'Mozo'
					)
				));
		$this->set('afipFacturas', $this->Paginator->paginate());
	}
860321
public function index()
    {
        $templates = IncidentTemplate::query();

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::has('order') && Binput::get('order') == 'desc';

            $templates->sort($sortBy, $direction);
        }

        $templates = $templates->paginate(Binput::get('per_page', 20));

        return $this->paginator($templates, Request::instance());
    }
97640
public function index()
    {
        if (app(Guard::class)->check()) {
            $components = Component::query();
        } else {
            $components = Component::enabled();
        }

        if ($tags = Binput::get('tags')) {
            $components->withAnyTags($tags);
        }

        $components->search(Binput::except(['sort', 'order', 'per_page']));

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::has('order') && Binput::get('order') == 'desc';

            $components->sort($sortBy, $direction);
        }

        $components = $components->paginate(Binput::get('per_page', 20));

        return $this->paginator($components, Request::instance());
    }
67837
public function submitSort()
    {
        $order = 1;
        $galleryData = $this->_defaultData($this->_block->getContent());
        foreach (Request::input('arr') as $image) {
            if (!isset($galleryData[$image])) {
                return 0;
            }
            $galleryData[$image]->order = $order++;
        }
        $this->_block->updateContent(serialize($galleryData));
        if ($this->_block->getPageId() && !config('coaster::admin.publishing')) { // update live page if no publishing
            PageVersion::latest_version($this->_block->getPageId(), true)->publish();
        }
        return 1;
    }
458304
public function onSort()
    {
        if ($column = post('sortColumn')) {

            /*
             * Toggle the sort direction and set the sorting column
             */
            $sortOptions = ['column' => $this->getSortColumn(), 'direction' => $this->sortDirection];

            if ($column != $sortOptions['column'] || $sortOptions['direction'] == 'asc') {
                $this->sortDirection = $sortOptions['direction'] = 'desc';
            }
            else {
                $this->sortDirection = $sortOptions['direction'] = 'asc';
            }

            $this->sortColumn = $sortOptions['column'] = $column;

            $this->putSession('sort', $sortOptions);

            /*
             * Persist the page number
             */
            $this->currentPageNumber = post('page');

            return $this->onRefresh();
        }
    }
443316
public function sort()
    {
        $order = static::config()->uninherited('module_priority');
        $project = static::config()->get('project');

        /* @var PrioritySorter $sorter */
        $sorter = Injector::inst()->createWithArgs(
            PrioritySorter::class . '.modulesorter',
            [
                $this->modules,
                $order ?: []
            ]
        );

        if ($project) {
            $sorter->setVariable(self::PROJECT_KEY, $project);
        }

        $this->modules = $sorter->getSortedList();
    }
295641
public function sortActive()
    {
        $sortIndex = $this->_sortIndex();
        if ($sortIndex === null) {
            return false;
        }
        return $sortIndex == $this->index();
    }
154154
public function index()
    {
        // Look for overriden views
        $this->overrideViews();

        // Get models to show
        $results = $this->makeIndexQuery()->paginate($this->perPage());

        // Render the view using the `listing` builder
        $listing = Listing::createFromController($this, $results);
        if ($this->parent) {
            $listing->parent($this->parent);

            // The layout header may have a many to many autocomplete
            $this->layout->with($this->autocompleteViewVars());
        }

        // Render view
        return $this->populateView($listing);
    }
1158575
public function index()
    {
        $page = $this->request->getQuery('page', 1);

        //Sets the cache name
        $cache = sprintf('index_limit_%s_page_%s', $this->paginate['limit'], $page);

        //Tries to get data from the cache
        list($posts, $paging) = array_values(Cache::readMany(
            [$cache, sprintf('%s_paging', $cache)],
            $this->Posts->getCacheName()
        ));

        //If the data are not available from the cache
        if (empty($posts) || empty($paging)) {
            $posts = $this->paginate($this->Posts->find('active')->find('forIndex'));

            //Writes on cache
            Cache::writeMany([
                $cache => $posts,
                sprintf('%s_paging', $cache) => $this->request->getParam('paging'),
            ], $this->Posts->getCacheName());
        //Else, sets the paging parameter
        } else {
            $this->request = $this->request->withParam('paging', $paging);
        }

        $this->set(compact('posts'));
    }
585637
public function sort()
    {
        $values = $this->toArray();
        ksort($values);
        
        $this->clear();
        
        foreach($values as $index => $value) {
            $this->set($index,$value);
        }
        
        return $this;
    }
773661
public function index()
    {
        //  Page data
        $this->data['page']->title = 'Blog &rsaquo; Tags';

        // --------------------------------------------------------------------------

        $data                  = array();
        $data['include_count'] = true;
        $data['where']         = array();
        $data['where'][]       = array('column' => 'blog_id', 'value' => $this->blog->id);

        $this->data['tags'] = $this->blog_tag_model->getAll(null, null, $data);

        // --------------------------------------------------------------------------

        Helper::loadView('index');
    }
73343
public function sortZones()
    {
        $ini = eZINI::instance('zone.ini');
        $zones = $ini->variable( $this->attribute('zone_layout'), 'Zones' );

        $sortedZones = array();
        foreach( $zones as $zone )
        {
            foreach( $this->attribute('zones') as $zoneObj )
            {
                if( !( $zoneObj instanceof eZPageZone ) )
                    continue;

                if ( $zone == $zoneObj->attribute('zone_identifier') )
                    $sortedZones[] = $zoneObj;
            }
        }

        $this->setAttribute( 'zones', $sortedZones );
    }
380302
public function index()
    {
        $metrics = Metric::query();

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::has('order') && Binput::get('order') == 'desc';

            $metrics->sort($sortBy, $direction);
        }

        $metrics = $metrics->paginate(Binput::get('per_page', 20));

        return $this->paginator($metrics, Request::instance());
    }