Display emails
GET /admin/emailhandling/index

@return Response
189253
public function index() {

        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('index')) {

            Session::flash('status_code', 400 );
            $message = "You are not allowed to view the list of ".$this->tableName;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'                => $this->model->package_title,
                'table_type_plural'            => $this->model->table,
                'resource_route_name'          => $this->model->resource_route_name,
                'table_type_singular'          => strtolower($this->model->model_class),
                'HTMLHelper'                   => HTMLHelper::class,
            ]);
        }

        // If this user has locked records for this table, then unlock 'em
        $this->repository->unlockMyRecords($this->model->table);

        $records = $this->repository->getEmailMessagesForAdminIndex(Auth::user()->id);

        return view('lasallecmsemail::admin/emailhandling/index',
            [
                'records'                      => $records,
                'package_title'                => $this->model->package_title,
                'table_name'                   => $this->model->table,
                'model_class'                  => $this->model->model_class,
                'resource_route_name'          => $this->model->resource_route_name,
                'DatesHelper'                  => DatesHelper::class,
                'HTMLHelper'                   => HTMLHelper::class,
                'Config'                       => Config::class,
                'admin_template_name'          => config('lasallecmsadmin.admin_template_name'),
            ]);
    }
527390
public function index()
    {
        $this->authorize('readList', File::class);
        $input  = $this->validator->validate('list');
        $params = $this->processor->process($input)->getProcessedFields();
        $query  = QueryBuilder::with($params['filter'], $params['orderBy'], $params['query']);
        $query->setPageSize($params['perPage']);
        $results = $this->fileRepo->getFiles($query, $params['page']);
        return $this->respondWithSuccess($results, new FileTransformer);
    }
858157
public function indexAction()
    {
        $jobManager = $this->get('phlexible_queue.job_manager');

        $data = [];

        foreach ($jobManager->findAll() as $job) {
            $data[] = [
                'id' => $job->getId(),
                'command' => $job->getCommand(),
                'arguments' => implode(' ', $job->getArguments()),
                'priority' => $job->getPriority(),
                'status' => $job->getStatus(),
            ];
        }

        $out = '<pre>Current jobs: '.PHP_EOL;
        $out .= print_r($data, 1);

        return new Response($out);
    }
752566
public function index()
    {
        if (request()->ajax()) {
            return response()->json([
                'status' => true,
                'files' => $this->model
                    ->when('owner' != user('role'), function ($query) {
                        // Show files only to current user.
                        $query->where('user_id', user('id'));
                    })
                    ->filter(request([
                        'attachment_id',
                        'attachment_type',
                    ]))
                    ->get(),
            ], 200);
        }

        return $this->makeResponse('index', [
            'filetype' => html_secure(request('filetype', null)),
            'files' => $this->model
                ->with([
                    'attachment'
                ])
                ->when('owner' != user('role'), function ($query) {
                    // Show files only to current user.
                    $query->where('user_id', user('id'));
                })
                // Show files only to articles.
                // ->where('attachment_type', (new Article)->getMorphClass())
                ->filter(request(['filetype', 'user']))
                ->latest()
                ->paginate(18)
                ->appends(
                    request()->except(['page'])
                )
        ]);
    }
376543
public function index()
    {
        Piwik::checkUserIsNotAnonymous();

        $view = new View('@MobileMessaging/index');
        $this->setManageVariables($view);

        return $view->render();
    }
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());
    }
843689
public function indexAction()
    {
        $em = $this->getDoctrineManager();

        $sakonninTemplates = $em->getRepository('BisonLabSakonninBundle:SakonninTemplate')->findAll();

        return $this->render('BisonLabSakonninBundle:SakonninTemplate:index.html.twig',
            array( 'sakonninTemplates' => $sakonninTemplates,));
    }
349716
public function getAuthorEmail()
    {
        if ($this->Email) {
            return $this->Email;
        } elseif ($author = $this->Author()) {
            return $author->Email;
        }
    }
1265575
public function index()
    {
        $options = $this->getParams('offset', 'limit', 'includes', 'order_by');

        $orders = Subbly::api('subbly.order')->all($options);

        return $this->jsonCollectionResponse('orders', $orders);
    }
1340150
public function indexAction()
    {
        $this->get('profiler')->disable();

        $messageListDTO = $this->get('cocorico.swift_reader.message_manager')
            ->getMessageListDTO();

        return $this->render(
            'CocoricoSwiftReaderBundle:Message:index.html.twig',
            array(
                'messages' => $messageListDTO->messages
            )
        );
    }
911006
public function indexAction()
    {
        $optionsProvider = $this->getOptionsProvider();
        if ($this->getRequest()->isPost()) {
            $event = $this->request->getPost('suboperation');
            if (! empty($event)) {
                $events = $this->getEventManager();
                $params = $this->request->getPost();
                $result = $events->trigger($event, $this, $params);
                if ($result->last() instanceof Response) {
                    return $result->last();
                }
            }
        }
        $lists = $this->getContentListProvider();

        $view = new ViewModel([
            'optionsProvider' => $optionsProvider,
            'contentListsProvider' => $lists
        ]);

        $flashMessenger = $this->flashMessenger();
        if ($flashMessenger->hasMessages()) {
            $view->messages = $flashMessenger->getMessages();
        }

        return $view;
    }
990865
public function index()
    {
        // flush filters if not ajax
        if (!request()->ajax()) {
            session()->forget('filtered');
            session()->forget('filter_fullname');
            session()->forget('filter_email');
            session()->forget('filter_cellphone');
        }

        // paginator
        $paginator = $this->getPaginator();

        // if pagination ajax
        if (request()->ajax()) {
            return response()->json(view('admin.accounts.clients.pagination')
                ->with('paginator', $paginator)
                ->render());
        }

        save_resource_url();

        return $this->view("titan::accounts.clients.index")->with('paginator', $paginator);
    }
459121
public function indexAction()
    {
        $results = array();
        $key  = '';
        $db   = '-1';
        if($this->getRequest()->isMethod('POST')) {
            $key = $this->getRequest()->get('key');
            $db  = $this->getRequest()->get('database');

            $keys = $this->getWorker()->keys($key, $db);

            if(empty($keys)) {
                $this->get('session')->getFlashBag()->add('notice', 'No result found');
            }else if(is_array($keys)) {
                foreach($keys as $k) {
                    $value = $this->getWorker()->get($k, $db);
                    $ttl = $this->getWorker()->ttl($k, $db);
                    $results[] = array(
                        'key'      => $k,
                        'value'    => $value,
                        'expireAt' => ($ttl == -1) ? '-' : strftime("%a %d %b %H:%M:%S %Y", time() + $ttl),
                        'weight'   => (mb_strlen($value, '8bit') / 1000). ' Kb'
                    );
                }
            }
        }

        return $this->render(
            $this->getTemplatePath().'index.html.twig',
            array(
                'instance'  => $this->getCurrentInstance(),
                'results'   => $results,
                'key'       => $key,
                'db'        => $db
            )
        );
    }
1191895
public function index()
    {
        $newsletters = $this->newsletter->getAll();
        $listes      = $this->list->getAll();

        return view('newsletter::Backend.template.index')->with(['newsletters' => $newsletters, 'listes' => $listes]);
    }
1359946
public function emailAction()
    {
        $model   = $this->getModel();

        $model->setFilter($this->getSearchFilter(false));

        $sort = array(
            'gr2o_email'          => SORT_ASC,
            'grs_first_name'     => SORT_ASC,
            'grs_surname_prefix' => SORT_ASC,
            'grs_last_name'      => SORT_ASC,
            'gto_valid_from'     => SORT_ASC,
            'gto_round_order'    => SORT_ASC,
            'gsu_survey_name'    => SORT_ASC,
        );

        if ($tokensData = $model->load(true, $sort)) {
            $params['mailTarget']           = 'token';
            $params['menu']                 = $this->menu;
            $params['model']                = $model;
            $params['identifier']           = $this->_getIdParam();
            $params['view']                 = $this->view;
            $params['routeAction']          = 'index';
            $params['formTitle']            = sprintf($this->_('Send mail to: %s'), $this->getTopic());
            $params['templateOnly']         = ! $this->currentUser->hasPrivilege('pr.token.mail.freetext');
            $params['multipleTokenData']    = $tokensData;

            $this->addSnippet('Mail_TokenBulkMailFormSnippet', $params);
        } else {
            $this->addMessage($this->_('No tokens found.'));
        }
    }
1191411
public function actionIndex()
    {
        $searchModel = new OrderSearch();
        $queryParams = request()->queryParams;
        $queryParams['OrderSearch']['customer_username'] = get_current_user_name();
        $dataProvider = $searchModel->search($queryParams);
        $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];
        $dataProvider = $searchModel->search(request()->queryParams);

        return $this->render('index', [
            'searchModel'  => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
118794
public function actionIndex() {
    $roles = Yii::$app->authManager->getRoles();
    $dataProvider = new ArrayDataProvider(['allModels' => $roles]);
    return $this->render('index', [
      'dataProvider' => $dataProvider,
    ]);
  }