default index action

@return type
357248
public function index()
    {
        $urls = [];
        foreach ($this->actions as $action => $description) {
            $fired = \Illuminate\Support\Facades\Event::fire('analyzer:before.' . $action);
            if (!empty($fired)) {
                array_push($urls, current($fired));
            }
            array_push($urls, [
                'url'         => handles('antares::logger/analyze/' . $action, ['csrf' => true]),
                'description' => $description,
            ]);
        }
        return new JsonResponse($urls);
    }
536426
public function actionIndex()
    {
        $extensions = Extension::find()->all();
        if (empty($extensions)) {
            echo "<empty list>";
        }
        echo"|";
        echo sprintf("%28s", "Class Name");
        echo"|";
        echo sprintf("%4s", "Enb");
        echo"|";
        echo sprintf("%4s", "Mnp");
        echo"|";
        echo sprintf("%4s", "Dft");
        echo"|";
        echo sprintf("%20s", "Create Time");
        echo"|";
        echo sprintf("%20s", "Update Time");
        echo"|";
        echo "\r\n";
        foreach ($extensions as $extension) {
            echo"|";
            echo sprintf("%28s", $extension->classname);
            echo"|";
            echo sprintf("%4d", $extension->isEnabled);
            echo"|";
            echo sprintf("%4d", $extension->monopolized);
            echo"|";
            echo sprintf("%4d", $extension->default);
            echo"|";
            echo sprintf("%20s", $extension->createdAt);
            echo"|";
            echo sprintf("%20s", $extension->updatedAt);
            echo"|";
            echo "\r\n";
        }
        return 0;
    }
1057689
public function indexAction()
    {
        $contentTypes = $this->get('opifer.content.content_type_manager')->getRepository()
            ->findAll();

        return $this->render($this->getParameter('opifer_content.content_type_index_view'), [
            'content_types' => $contentTypes,
        ]);
    }
135022
public function actionIndex()
    {
        $this->getSearchCriteria();
        $this->layout = static::TABLE_LAYOUT;
        return $this->render('index', [
            'searchModel' => $this->searchModel,
            'dataProvider' => $this->dataProvider,
        ]);
    }
860654
public function indexAction()
    {
        $group = $this->currentUser->getGroup();
        if ($group && $this->enableScreens) {
            $browse = $group->getRespondentBrowseScreen();

            if ($browse) {
                if ($browse instanceof ProcessModelInterface) {
                    $browse->processModel($this->getModel());
                }

                // All are arrays, so easy to set
                $this->autofilterParameters = $browse->getAutofilterParameters() + $this->autofilterParameters;
                $this->indexParameters      = $browse->getStartStopParameters() + $this->indexParameters;

                $autoSnippets = $browse->getAutofilterSnippets();
                if (false !== $autoSnippets) {
                    $this->autofilterSnippets = $autoSnippets;
                }
                $startSnippets = $browse->getStartSnippets();
                if (false !== $startSnippets) {
                    $this->indexStartSnippets = $startSnippets;
                }
                $stopSnippets = $browse->getStopSnippets();
                if (false !== $stopSnippets) {
                    $this->indexStopSnippets = $stopSnippets;
                }
            }
        }
        if ($this->currentUser->hasPrivilege('pr.respondent.multiorg') ||
                $this->currentOrganization->canHaveRespondents()) {
            parent::indexAction();
        } else {
            $this->addSnippet('Organization\\ChooseOrganizationSnippet');
        }
    }
620322
public function indexAction()
    {
        $forms = $this->get('opifer.form.form_manager')->getRepository()
            ->findAllWithPosts();

        return $this->render($this->getParameter('opifer_form.form_index_view'), [
            'forms' => $forms,
        ]);
    }
505410
public function actionIndex()
    {
        return $this->render('index', [
            'members' => User::find()->orderBy(['id' => SORT_DESC])->limit(10)->all(),
            'posts' => Post::find()->orderBy(['id' => SORT_DESC])->limit(10)->all()
        ]);
    }
305580
protected function setDefaultRowActions()
    {
        $actions = $this->info->list->default_action ?: [];

        if (count($actions)) {
            return $this;
        }

        $addEditAction = config('cms-models.defaults.default-listing-action-edit', false);
        $addShowAction = config('cms-models.defaults.default-listing-action-show', false);

        if ( ! $addEditAction && ! $addShowAction) {
            return $this;
        }

        // The edit and/or show action should be set as default index row click action.

        $modelSlug        = $this->getRouteHelper()->getRouteSlugForModelClass(get_class($this->model));
        $permissionPrefix = $this->getRouteHelper()->getPermissionPrefixForModelSlug($modelSlug);

        if ($addEditAction) {
            $actions[] = [
                'strategy'    => ActionReferenceType::EDIT,
                'permissions' => "{$permissionPrefix}edit",
            ];
        }

        if ($addShowAction) {
            $actions[] = [
                'strategy'    => ActionReferenceType::SHOW,
                'permissions' => "{$permissionPrefix}show",
            ];
        }

        $this->info->list->default_action = $actions;

        return $this;
    }
152910
protected function getIndex()
	{
		if (!$this->index) {
			$this->index = $this->getClient()->initIndex($this->name);
		}
		
		return $this->index;
	}
233570
public function indexAction()
    {
        $out = '<pre>';

        $elementService = $this->get('phlexible_element.element_service');
        $elementtypeService = $this->get('phlexible_elementtype.elementtype_service');
        $conn = $this->get('doctrine.dbal.default_connection');
        /* @var $conn Connection */

        // elements

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(e.eid)')
            ->from('element', 'e');
        $numElements = $conn->fetchColumn($qb->getSQL());

        $qb = $conn->createQueryBuilder()
            ->select('DISTINCT t.type_id')
            ->from('tree', 't')
            ->join('t', 'element', 'e', 't.type_id = e.eid')
            ->where('t.type = "element"');
        $numTreeElements = count($conn->fetchAll($qb->getSQL()));

        $qb = $conn->createQueryBuilder()
            ->select('DISTINCT t.type_id')
            ->from('teaser', 't')
            ->join('t', 'element', 'e', 't.type_id = e.eid')
            ->where('t.type = "element"');
        $numTeaserElements = count($conn->fetchAll($qb->getSQL()));

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(e.eid)')
            ->from('element', 'e')
            ->where('eid NOT IN (SELECT DISTINCT type_id FROM tree WHERE type = "element")')
            ->andWhere('eid NOT IN (SELECT DISTINCT type_id FROM teaser WHERE type = "element")');
        $numUnusedElements = $conn->fetchColumn($qb->getSQL());

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(ev.id)')
            ->from('element_version', 'ev');
        $numElementVersions = $conn->fetchColumn($qb->getSQL());

        $qb = $conn->createQueryBuilder()
            ->select(['ev.eid, COUNT(ev.eid) AS cnt'])
            ->from('element_version', 'ev')
            ->groupBy('ev.eid')
            ->orderBy('cnt', 'DESC');
        $numGroupedElementVersions = [];
        foreach ($conn->fetchAll($qb->getSQL()) as $row) {
            $numGroupedElementVersions[$row['eid']] = $row['cnt'];
        }

        // elementtypes

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(et.id)')
            ->from('elementtype', 'et');
        $numElementTypes = $conn->fetchColumn($qb->getSQL());

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(et.id)')
            ->from('elementtype', 'et')
            ->where('et.id NOT IN (SELECT DISTINCT element_type_id FROM element)')
            ->where('et.id NOT IN (SELECT DISTINCT reference_id FROM elementtype_structure)');
        $numUnusedElementTypes = $conn->fetchColumn($qb);

        $qb = $conn->createQueryBuilder()
            ->select('COUNT(etv.id)')
            ->from('elementtype_version', 'etv');
        $numElementTypeVersions = $conn->fetchColumn($qb->getSQL());

        $qb = $conn->createQueryBuilder()
            ->select(['etv.elementtype_id', 'COUNT(etv.id) AS cnt'])
            ->from('elementtype_version', 'etv')
            ->groupBy('etv.elementtype_id')
            ->orderBy('cnt', 'DESC');
        $numGroupedElementTypeVersions = [];
        foreach ($conn->fetchAll($qb->getSQL()) as $row) {
            $numGroupedElementTypeVersions[$row['elementtype_id']] = $row['cnt'];
        }

        $qb = $conn->createQueryBuilder()
            ->select(['et.id', 'COUNT(e.eid) AS cnt'])
            ->from('elementtype', 'et')
            ->leftJoin('et', 'element', 'e', 'e.elementtype_id = et.id')
            ->groupBy('et.id')
            ->orderBy('cnt', 'DESC');
        $numGroupedElementTypeElements = [];
        foreach ($conn->fetchAll($qb->getSQL()) as $row) {
            $numGroupedElementTypeElements[$row['id']] = $row['cnt'];
        }

        $out .= '##### Elements ############################################'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= $numElements.' elements'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= $numTreeElements.' tree elements'.PHP_EOL;
        $out .= $numTeaserElements.' teaser elements'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= ($numTreeElements + $numTeaserElements).' used elements'.PHP_EOL;
        $out .= $numUnusedElements.' unused elements'.PHP_EOL;
        $out .= '(= '.($numTreeElements + $numTeaserElements + $numUnusedElements).' elements)'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= $numElementVersions.' element versions'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= 'Top 5 most element versions:'.PHP_EOL;
        $i = 0;
        foreach ($numGroupedElementVersions as $eid => $count) {
            if ($i >= 5) {
                break;
            }
            $element = $elementService->findElement($eid);
            $elementVersion = $elementService->findLatestElementVersion($element);
            $out .= '  '.str_pad($elementVersion->getBackendTitle('de', 'en').' ['.$eid.']', 40, ' ')
                .' => '.str_pad($count, 4, ' ', STR_PAD_LEFT).' versions'.PHP_EOL;
            ++$i;
        }
        $out .= PHP_EOL;
        $out .= '##### Element Types #######################################'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= $numElementTypes.' element types'.PHP_EOL;
        $out .= $numUnusedElementTypes.' unused element types'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= $numElementTypeVersions.' element type versions'.PHP_EOL;
        $out .= PHP_EOL;
        $out .= 'Top 5 most element type versions:'.PHP_EOL;
        $i = 0;
        foreach ($numGroupedElementTypeVersions as $etId => $count) {
            if ($i >= 5) {
                break;
            }
            $elementtype = $elementtypeService->findElementtype($etId);
            $out .= '  '.str_pad($elementtype->getTitle().' ['.$etId.']', 40, ' ')
                .' => '.str_pad($count, 4, ' ', STR_PAD_LEFT).' versions'.PHP_EOL;
            ++$i;
        }
        $out .= PHP_EOL;
        $out .= 'Top 5 most element types by elements:'.PHP_EOL;
        $i = 0;
        foreach ($numGroupedElementTypeElements as $etId => $count) {
            if ($i >= 5) {
                break;
            }
            $elementtype = $elementtypeService->findElementtype($etId);
            $out .= '  '.str_pad($elementtype->getTitle().' ['.$etId.']', 40, ' ').' => '
                .str_pad($count, 4, ' ', STR_PAD_LEFT).' elements'.PHP_EOL;
            ++$i;
        }

        return new Response($out);
    }
221327
public function indexAction()
  {
    try
    {
      /* query list of virtual servers */
      $this->tpl->ts3_servers = $this->ts3->serverList();
    }
    catch(Exception $e)
    {
      /* fallback to default values */
      $this->tpl->ts3_servers = array();

      /* save catched error mesage */
      $this->setLastEvent($e->getMessage(), TRUE);
    }

    $this->assignLastEvent();
  }
755074
public function indexAction()
    {
        if (!$this->canQueueSelectedSite()) {
            $this->view->assign('can_not_proceed', true);
            return;
        }

        $statistics = $this->indexQueue->getStatisticsBySite($this->selectedSite);
        $this->view->assign('indexQueueInitializationSelector', $this->getIndexQueueInitializationSelector());
        $this->view->assign('indexqueue_statistics', $statistics);
        $this->view->assign('indexqueue_errors', $this->indexQueue->getErrorsBySite($this->selectedSite));
    }
1372273
public function actionFillIndex()
    {
        try {
            $this->client->ping();
        } catch (NoNodesAvailableException $e) {
            $this->stderr($e->getMessage() . ', maybe you first need to configure and run elasticsearch' . PHP_EOL);
            return;
        }
        /** @var HasProperties | PropertiesTrait $model */
        foreach ($this->applicables as $indexName => $model) {
            if (true === $this->client->indices()->exists(['index' => $indexName])) {
                $this->client->indices()->delete(['index' => $indexName]);
            }
            $config = self::prepareIndexConfig();
            $config['index'] = $indexName;
            $response = $this->client->indices()->create($config);
            if (true === isset($response['acknowledged']) && $response['acknowledged'] == 1) {
                foreach (self::$storage as $className => $id) {
                    $indexData = self::prepareIndexData($model, $indexName, $className, $id);
                    if (false === empty($indexData['body'])) {
                        $this->client->bulk($indexData);
                    }
                }
            }
        }
    }
773160
public function actionIndex()
    {
        $model = new Payment();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['/payment/default/pay', 'id' => $model->id]);
        }
        return $this->render('index', ['model' => $model]);
    }
328864
public function indexAction()
    {
        // Clear the user identity, if any. (#370)
        if (PHP_SESSION_ACTIVE !== session_status()) {
            session_start();
        }
        session_destroy();

        $form    = $this->installForm;
        $prereqs = $this->plugin('Install/Prerequisites')->check();
    
        return $this->createViewModel(
            array(
                'prerequisites' => $prereqs,
                'form'          => $form,
                'lang'          => $this->params('lang'),
            )
        );
    }
915831
public function getDefaultAction()
    {
        // Determine the appliccable action
        if ( ! $this->default_action) {
            return null;
        }

        $actions = $this->default_action;

        if ( ! is_array($actions)) {
            $actions = [
                new ModelActionReferenceData([
                    'strategy' => $actions,
                ]),
            ];
        }

        $core = $this->getCore();


        foreach ($actions as $action) {

            $permissions = $action->permissions();

            if (    ! count($permissions)
                ||  $core->auth()->user()->isAdmin()
                ||  $core->auth()->user()->can($permissions)
            ) {
                return $action;
            }
        }

        return null;
    }
612544
private function typeNormal()
    {
        $requestKey = 'action';
        $defaultRoute = 'Index.index';
        $route = isset($_REQUEST[$requestKey]) ? $_REQUEST[$requestKey] : $defaultRoute;
        return $this->render($route);
    }