index.

@param int $formId

@return Response
501234
public function indexAction($formId)
    {
        $form = $this->get('opifer.form.form_manager')->getRepository()->find($formId);

        if (!$form) {
            return $this->createNotFoundException();
        }

        return $this->render($this->getParameter('opifer_form.post_index_view'), [
            'form' => $form,
        ]);
    }
1058143
public static function findByFormSubmitId( $formSubmitId ) {

		$frmSubmitTable	= FormTables::getTableName( FormTables::TABLE_FORM_SUBMIT );

		$query	= static::find()->joinWith( 'formSubmit' )->where( "$frmSubmitTable.id=:id", [ ':id' => $formSubmitId ] );

		return $query->all();
	}
1304241
public function index($id)
    {
        $this->authorize('readList', Block::class);
        $input  = $this->validator->validate('list');
        $params = $this->processor->process($input)->getProcessedFields();
        $block  = $this->repository->getById($id);
        if (!empty($block)) {
            $results = $this->repository->getTranslations(
                $block,
                $params['filter'],
                $params['orderBy'],
                $params['page'],
                $params['perPage']
            );
            return $this->respondWithSuccess($results, new BlockTranslationTransformer);
        } else {
            return $this->respondNotFound();
        }
    }
818790
public function getIndex($itemId)
    {
        $item = Item::findOrFail($itemId);

        if (!$item->isStarted() && $item->seller->userId != Auth::user()->userId) {
            return mustard_redirect('/');
        }

        if (mustard_loaded('media')) {
            $photos = $item->photos()->orderBy('primary', 'desc')->get();

            if ($photos->isEmpty()) {
                $photos->push(new Photo());
            };
        }

        $bids = mustard_loaded('auctions')
            ? $item->getBidHistory()
            : new Collection();

        $highest_bid = mustard_loaded('auctions')
            ? ($bids->first() ?: new \Hamjoint\Mustard\Auctions\Bid())
            : new Collection();

        return view('mustard::item.summary', [
            'item'        => $item,
            'photos'      => $photos,
            'bids'        => $bids,
            'highest_bid' => $highest_bid,
        ]);
    }
545187
public function index($id = null)
    {
        // Support for resource/identifier/resource
        if ($id != null) {
            return $this->getById($id);
        }

        //parse the rquest
        $parse = new QueryParser($this->request->getQuery());
        $params = $parse->request();

        $results = $this->model->find($params);

        if ($this->request->hasQuery('relationships')) {
            $relationships = $this->request->getQuery('relationships', 'string');

            $results = QueryParser::parseRelationShips($relationships, $results);
        }

        //this means the want the response in a vuejs format
        if ($this->request->hasQuery('format')) {
            unset($params['limit'], $params['offset']);

            $results = [
                'data' => $results,
                'limit' => $this->request->getQuery('limit', 'int'),
                'page' => $this->request->getQuery('page', 'int'),
                'total_pages' => ceil($this->model->count($params) / $this->request->getQuery('limit', 'int')),
            ];
        }

        return $this->response($results);
    }
1229673
public function renderFormBasketElementAction(FormView $formView, BasketElementInterface $basketElement, BasketInterface $basket)
    {
        $provider = $this->get('sonata.product.pool')->getProvider($basketElement->getProduct());

        return $this->render(sprintf('%s:form_basket_element.html.twig', $provider->getBaseControllerName()), [
            'formView' => $formView,
            'basketElement' => $basketElement,
            'basket' => $basket,
        ]);
    }
605889
public function index()
    {
        $items = $this->service->all();

        return $this->response()->collection($items, $this->transformer);
    }
240888
public function index($teamId)
    {
        $team = Team::findOrFail($teamId);
        $this->authorize('view', $team);
        return $this->respondRelatedAddresses($teamId, 'address');
    }
178427
protected function getCreationEvent($formData)
    {
        $event = new IndexEngineDriverConfigurationEvent();

        $event->setCode($formData["code"]);
        $event->setDriverCode($formData["driver_code"]);
        $event->setTitle($formData["title"]);
        $event->setSerializedConfiguration($formData["serialized_configuration"]);

        return $event;
    }
673426
protected function getUpdateEvent($formData)
    {
        $event = new IndexEngineDriverConfigurationEvent();

        $event->setId($formData["id"]);
        $event->setTitle($formData["title"]);

        return $event;
    }
281364
public function index($locationId)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $location = Location::findOrFail($locationId);
        $this->authorize('view', $location);
        return $this->respondRelatedAddresses($locationId, 'location');
    }
1179239
public static function getOrder($orderId) {
        $response = self::requestApi("get", null, $orderId);
        $body = $response->getBodyAsJson();
        $order = new Order($body["order"]);
        return $order;
    }
1177191
public function index($id)
    {
        $this->authorize('readList', File::class);
        $input  = $this->validator->validate('list');
        $params = $this->processor->process($input)->getProcessedFields();
        $file   = $this->repository->getById($id);
        if (!empty($file)) {
            $results = $this->repository->getTranslations(
                $file,
                $params['filter'],
                $params['orderBy'],
                $params['page'],
                $params['perPage']
            );
            return $this->respondWithSuccess($results, new FileTranslationTransformer);
        } else {
            return $this->respondNotFound();
        }
    }
349032
public function indexAction($form = null)
    {
        $form = $form ?: $this->createForm(BasketType::class, $this->get('sonata.basket'), [
            'validation_groups' => ['elements'],
        ]);

        // always validate the basket
        if (!$form->isSubmitted()) {
            if ($violations = $this->get('validator')->validate($form)) {
                $violationMapper = new ViolationMapper();
                foreach ($violations as $violation) {
                    $violationMapper->mapViolation($violation, $form, true);
                }
            }
        }

        $this->get('session')->set('sonata_basket_delivery_redirect', 'sonata_basket_delivery_address');

        $this->get('sonata.seo.page')->setTitle($this->get('translator')->trans('basket_index_title', [], 'SonataBasketBundle'));

        return $this->render('SonataBasketBundle:Basket:index.html.twig', [
            'basket' => $this->get('sonata.basket'),
            'form' => $form->createView(),
        ]);
    }
548603
public function getShowById($showId)
  {
    $response = $this->request('/GetShowById/' . $showId);
    if ( $response->response->status == 'false' )
      return null;
    $show     = $response->response;

    $show = $this->formatShow($show);

    return $show;
  }
1306320
public static function & GetById ($formId) {
		if (isset(self::$instances[$formId])) {
			return self::$instances[$formId];
		} else {
			throw new \RuntimeException(
				'No form instance exists under form id `'.$formId.'`.'
				. ' Check if searched form instance has been already initialized'
				. ' or if form id has been already set.'
			);
		}
	}
439599
public function getIndexes($collectionId)
    {
        $urlParams = [self::OPTION_COLLECTION => $collectionId];
        $url       = UrlHelper::appendParamsUrl(Urls::URL_INDEX, $urlParams);
        $response  = $this->getConnection()->get($url);

        return $response->getJson();
    }