index method

@return void
487593
public function index() {

		$this->Printer->recursive = 0;
		$impresoras = $this->Paginator->paginate();

		$impresorasModificadas = array();
		foreach( $impresoras as $imp ) {
			// por cada impresora, le agrego la cantidad de productos relacionados que tiene
			$printerId = $imp['Printer']['id'];
			$cant = $this->Printer->cantidadDeProductosEnImpresora($printerId);
			$imp['Printer']['cantidad_productos'] = $cant;
			$impresorasModificadas[] = $imp;
		}

		$this->set('printers', $impresorasModificadas);
	}
472945
public function index()
    {
        $this->viewBuilder()->setLayout(false);
        $this->set('uiConfig', $this->config['ui']);
        $this->set('url', $this->getDefaultDocumentUrl());
    }
550273
public function actionIndex()
    {
        $dataProvider = new AuthItemDataProvider();
        $dataProvider->type = $this->type;

        $this->render(
            'index',
            array(
                'dataProvider' => $dataProvider,
            )
        );
    }
371387
public function index()
    {
        $this->loadModel('Menu.Menus');
        $menus = $this->Menus->find()->all();

        $this->title(__d('menu', 'Menus List'));
        $this->set('menus', $menus);
        $this->Breadcrumb->push('/admin/menu/manage');
    }
307662
public function index()
    {
        /** @var \Colibri\Database\ModelCollection $items */
        $items = new $this->listClass();
        $this->applyListFilters($items);
        $items->load();

        $this->template->vars[$this->listTplVar] = $items;
        if ($this->pagedList) {
            $this->template->vars['pagination'] = [
                'page'           => (int)(isset($_GET['page']) ? $_GET['page'] : 0),
                'recordsPerPage' => $items->recordsPerPage,
                'recordsCount'   => $items->recordsCount,
                'pagesCount'     => $items->pagesCount,
                'base_url'       => '/' . $this->division . '/' . $this->module,
            ];
        }
    }
39356
public function index()
    {
        $pagination = new Pagination();
        $pattern = StaticFilter::filter(
            'text',
            $this->getController()->request->getQuery('pattern', null)
        );
        $this->view = 'scaffold/index';
        $descriptor =  $this->getDescriptor();

        /** @var Select $query */
        $query = call_user_func_array([$this->getModelName(), 'find'], []);
        $field = $descriptor->getDisplayField();
        $tableName = $descriptor->getDescriptor()->getEntity()->getTableName();
        $query->where(
            [
                "{$tableName}.{$field} LIKE :pattern" => [
                    ':pattern' => "%{$pattern}%"
                ]
            ]
        );
        $pagination->setTotal($query->count());
        $query->limit(
            $pagination->rowsPerPage,
            $pagination->offset
        );
        $records = $query->all();
        $this->set(compact('pagination', 'records', 'pattern', 'descriptor'));
    }
751738
public function index()
    {
        $this->Crud->on('beforePaginate', function (Event $event) {
            $query = $this->Users->find('search', $this->request->query);
            $query = $query->select(['id', 'username']);
            $event->subject->query = $query;
        });
        $this->Crud->execute();
    }
895154
public function index()
    {
        $this->data['page']->title = 'Manage Blogs';

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

        //  Get blogs
        $this->data['blogs'] = $this->blog_model->getAll();

        if (empty($this->data['blogs'])) {

            if (!userHasPermission('admin:blog:blog:create')) {

                $status   = 'message';
                $message  = '<strong>You don\'t have a blog!</strong> Create a new blog ';
                $message .= 'in order to configure blog settings.';

                $this->session->set_flashdata($status, $message);

                redirect('admin/blog/blog/create');

            }
        }

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

        //  Add a header button
        if (userHasPermission('admin:blog:blog:create')) {

             Helper::addHeaderButton('admin/blog/blog/create', 'Create Blog');
        }

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

        //  Load views
        Helper::loadView('index');
    }
1100003
public function index()
    {
        $this->loadModel('User.Users');
        $users = $this->Users->find()->contain(['Roles']);

        if (!empty($this->request->query['filter'])) {
            $this->Users->search($this->request->query['filter'], $users);
        }

        $this->title(__d('user', 'Users List'));
        $this->set('users', $this->paginate($users));
        $this->Breadcrumb->push('/admin/user/manage');
    }
665055
public function indexAction()
    {
        if ($this->checkForAnswersOnLoad) {
            $this->loader->getTracker()->processCompletedTokens(
                    null,
                    $this->currentUser->getUserId(),
                    $this->currentUser->getCurrentOrganizationId(),
                    true
                    );
        }

        parent::indexAction();
    }
980161
public function index()
    {
        $request = $this->makeRequest('index');
        $result = $this->service->getAll();

        return $this->maybeMakeResource('collection', $result);
    }
1074986
public function index(): void
    {
        $menus = $this->Menus->find('all');

        $this->set(compact('menus'));
        $this->set('_serialize', ['navMenu']);
    }
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'));
    }
1286149
public function index()
    {
        $query = $this->PostsTags->Tags->find()->matching('Posts');

        $this->paginate['order'] = ['tag' => 'ASC'];

        //Limit X4
        $this->paginate['limit'] = $this->paginate['maxLimit'] = $this->paginate['limit'] * 4;

        $tags = $this->paginate($this->PostsTags->Tags->queryFromFilter($query, $this->request->getQueryParams()));

        $this->set(compact('tags'));
    }
1113967
public function index()
    {
        return $this->render('index', [
            'model' => $this->model,
            'images' => Yii::$app->storage->findImages(['filter_id' => $this->model->id]),
        ]);
    }
158562
public function index()
    {
        $this->request->allowMethod('get');

        $query = $this->SavedSearches->find('all')
            ->where(['name IS NOT' => null])
            ->where(['name !=' => ''])
            ->where($this->request->getQueryParams());

        $entities = $this->paginate($query);

        $this->set('success', true);
        $this->set('data', $entities);
        $this->set('_serialize', ['success', 'data']);
    }
1156351
public function index()
    {
        $menus = $this->Filter->filter($this->Menus->find('all'))->hydrate(false);
        $this->set('menus', $menus);
    }