List the main collections.

@return Response
500261
public function indexAction()
    {
        $pager = $this->get('sonata.classification.manager.collection')
            ->getRootCollectionsPager($this->getCurrentRequest()->get('page'));

        return $this->render('SonataProductBundle:Collection:index.html.twig', [
            'pager' => $pager,
        ]);
    }
970764
public function listCollections($db = '')
    {
        $cursor = $this->cmd('listCollections', null, $db);
        $result = [];
        foreach ($cursor as $collection) {
            $result[] = $collection['name'];
        }
        return $result;
    }
47933
protected function getCollection(): Collection
    {
        $conn = $this->connPool->getConnection();
        $database = $conn->defaultDatabase;
        $collection = $this->schema->collection;

        return $conn->getRawConnection()->$database->$collection;
    }
390959
public function listAction(Request $request)
    {
        $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Storage');
        // response was not modified for this request
        if ($response->isNotModified($request)) {
            return $response;
        }

        /* @var $rep StorageRepository */
        $rep = $this->getDoctrine()->getRepository('AnimeDbCatalogBundle:Storage');

        return $this->render('AnimeDbCatalogBundle:Storage:list.html.twig', [
            'storages' => $rep->getList(),
        ], $response);
    }
1085821
public function index()
    {
        $modules = Module::all();
        $moduleDataGrid = new ModuleDataGrid($modules);

        return view('avored-framework::system.module.index')
            ->with('modules', $modules)
            ->with('dataGrid', $moduleDataGrid->dataGrid);
    }
327234
public function listAction()
    {
        $request = $this->getRequest();

        $this->admin->checkAccess('list');

        $preResponse = $this->preList($request);
        if (null !== $preResponse) {
            return $preResponse;
        }

        if ($listMode = $request->get('_list_mode')) {
            $this->admin->setListMode($listMode);
        }

        $datagrid = $this->admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        // set the theme for the current Admin Form
        $this->setFormTheme($formView, $this->admin->getFilterTheme());

        // NEXT_MAJOR: Remove this line and use commented line below it instead
        $template = $this->admin->getTemplate('list');
        // $template = $this->templateRegistry->getTemplate('list');

        return $this->renderWithExtraParams($template, [
            'action' => 'list',
            'form' => $formView,
            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
            'export_formats' => $this->has('sonata.admin.admin_exporter') ?
                $this->get('sonata.admin.admin_exporter')->getAvailableFormats($this->admin) :
                $this->admin->getExportFormats(),
        ], null);
    }
447427
def get_collections(self):
        
        collections = []
        for result in self._get_collections():
            collections.append(result['collection'])

        return collections
802827
public function getList()
    {
        return $this->find('list')
            ->order([$this->getDisplayField() => 'ASC'])
            ->cache(sprintf('%s_list', $this->getTable()), $this->getCacheName());
    }
787408
public function getCollectionAction()
    {
        if (!$this->isGranted('ROLE_API_USER')) {
            throw new AccessDeniedHttpException('Your account\'s api access is disabled');
        }
        $sitesAvailable = [];
        $sites = $this->getEntityManager()->getRepository('BackBee\Site\Site')->findAll();

        foreach ($sites as $site) {
            if ($this->isGranted('VIEW', $site)) {
                $sitesAvailable[] = $site;
            }
        }
        return new Response($this->formatCollection($sitesAvailable), 200,  ['Content-Type' => 'application/json']);
    }
324520
public function getAll()
	{
		$collection = new Collection;

		$keys = $this->database->keys($this->namespace.':*');

		foreach ($keys as $key)
		{
			list($namespace, $name) = explode(':', $key);

			if ( ! $collection->has($name))
			{
				$collection->put($name, $this->get($name));
			}
		}

		return $collection;
	}
1283590
public function getLists()
    {
        if(!$this->isPropertyAvailable('Lists')){
            $this->setProperty("Lists", new ListCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"Lists")));
        }
        return $this->getProperty("Lists");
    }
861170
public static function getCollection()
    {
        $collections = [
            JSON_ERROR_NONE => null,
            JSON_ERROR_DEPTH => [
                'message' => 'Maximum stack depth exceeded',
                'error-code' => 1,
            ],
            JSON_ERROR_STATE_MISMATCH => [
                'message' => 'Underflow or the modes mismatch',
                'error-code' => 2,
            ],
            JSON_ERROR_CTRL_CHAR => [
                'message' => 'Unexpected control char found',
                'error-code' => 3,
            ],
            JSON_ERROR_SYNTAX => [
                'message' => 'Syntax error, malformed JSON',
                'error-code' => 4,
            ],
            JSON_ERROR_UTF8 => [
                'message' => 'Malformed UTF-8 characters',
                'error-code' => 5,
            ],
            JSON_ERROR_RECURSION => [
                'message' => 'Recursion error in value to be encoded',
                'error-code' => 6,
            ],
            JSON_ERROR_INF_OR_NAN => [
                'message' => 'Error NAN/INF in value to be encoded',
                'error-code' => 7,
            ],
            JSON_ERROR_UNSUPPORTED_TYPE => [
                'message' => 'Type value given cannot be encoded',
                'error-code' => 8,
            ],
            'default' => [
                'message' => 'Unknown error',
                'error-code' => 999,
            ],
        ];

        if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
            $collections[JSON_ERROR_INVALID_PROPERTY_NAME] = [
                'message' => 'Name value given cannot be encoded',
                'error-code' => 9,
            ];
            $collections[JSON_ERROR_UTF16] = [
                'message' => 'Malformed UTF-16 characters',
                'error-code' => 10,
            ];
        }

        return $collections;
    }
1300571
protected function getListCollection()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->collection->getList($conditions);
    }
569092
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $this->params('mode', false);
        $type = $this->params('type', false);
        $endpoint = $this->params('endpoint', false);
        $annee = $this->params('annee', 0);
        $processHandler = $this->getProcessStateHandler();
        $executions = $processHandler->getProcessExecutions($mode, $type, $endpoint, $annee);
        if ($executions instanceof \Doctrine\ORM\PersistentCollection)
            $executions = $executions->toArray();
        usort($executions, function (Execution $a, Execution $b)
        {
            return intval($a->getId()) < intval($b->getId());
        });
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($executions, 'json');
        $response->setContent($processJson);
        return $response;
    }
931349
final public function findAll()
    {
        $this->query->setStartSelect();

        $this->query->prepare()->bindWhere()->bindLimit()->execute();

        $this->setRowCount();

        $collection = new Collection($this, $this->query->getSqlQuery());

        $this->query->close();

        return $collection();
    }
1186867
public function listAction()
    {
        $metaSetManager = $this->get('phlexible_meta_set.meta_set_manager');
        $metaSet = $metaSetManager->findAll();

        $data = [];
        foreach ($metaSet as $set) {
            /* @var $set MetaSetInterface */

            $data[] = [
                'id' => $set->getId(),
                'name' => $set->getName(),
                'createdAt' => $set->getCreatedAt() ? $set->getCreatedAt()->format('Y-m-d H:i:s') : null,
                'createUser' => $set->getCreateUser(),
                'modifiedAt' => $set->getModifiedAt() ? $set->getModifiedAt()->format('Y-m-d H:i:s') : null,
                'modifyUser' => $set->getModifyUser(),
                'revision' => $set->getRevision(),
            ];
        }

        return new JsonResponse(['sets' => $data]);
    }
284206
public function getList()
    {
        if ($this->kind === 'collection') {
            $model_class = $this->model_class;
            return $model_class::dump($this->where, $model_class::PRIMARY_KEY);
        }
        return [$this->where];
    }