Displays the collection item overview page
@param integer $collection_id
326123
public function listCollectionItem($collection_id)
    {
        $this->setCollectionCollection($collection_id);
        $this->actionListCollectionItem();

        $this->setTitleListCollectionItem();
        $this->setBreadcrumbListCollectionItem();
        $this->setFilterListCollectionItem();
        $this->setPagerListCollectionItem();

        $this->setData('collection', $this->data_collection);
        $this->setData('items', $this->getListCollectionItem());

        $this->outputListCollectionItem();
    }
1244788
public function actionView($id)
    {
        $model = $this->findModel($id);

        return $this->render('view', ['model' => $model, 'items' => $this->getItems($id)]);
    }
1321061
public function actionView($id)
    {
        $this->layout = static::MAIN_LAYOUT;
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }
534066
public function actionView($id)
    {
        $model = $this->findModel($id);
        $model->updateCounters(['views' => 1]);
        return $this->render($model->view, [
            'model' => $model,
        ]);
    }
193000
public function viewAction($collectionId, $slug)
    {
        $collection = $this->get('sonata.classification.manager.collection')->findOneBy(['id' => $collectionId]);

        if (!$collection) {
            throw new NotFoundHttpException(sprintf('Unable to find the collection with id=%d', $collectionId));
        }

        return $this->render('SonataProductBundle:Collection:view.html.twig', [
           'collection' => $collection,
        ]);
    }
411510
public function overviewAction()
    {
        /** @var StorageInterface $storage */
        $storage = $this->get('lexik_translation.translation_storage');

        $stats = $this->get('lexik_translation.overview.stats_aggregator')->getStats();

        return $this->render('@LexikTranslation/Translation/overview.html.twig', array(
            'layout'         => $this->container->getParameter('lexik_translation.base_layout'),
            'locales'        => $this->getManagedLocales(),
            'domains'        => $storage->getTransUnitDomains(),
            'latestTrans'    => $storage->getLatestUpdatedAt(),
            'stats'          => $stats,
        ));
    }
180472
protected function updateCollection($collection_id)
    {
        if (!$this->isError() && !$this->collection->update($collection_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
838028
public function display($id)
    {
        if (!$this->locking) {
            readfile($this->path . '/' . $id);

            return;
        }

        $fp = fopen($this->path . '/' . $id, 'rb');
        flock($fp, LOCK_SH);
        fpassthru($fp);
        flock($fp, LOCK_UN);
        fclose($fp);
    }
346664
def related(self, collection_id):
        
        url = "/collections/%s/related" % collection_id
        result = self._get(url)
        return CollectionModel.parse_list(result)
1108458
public function paginate($collection, $id = null)
    {
        $adapter = $this->adapterFactory->createAdapter($collection);

        $this->totalItems[md5($id)] = $adapter->getTotalResults();
        $offset = $this->calculateOffset($id);

        return $adapter->setOffset($offset)->setLength($this->getItemsPerPage($id));
    }
1027597
public function detailAction($id, Request $request)
    {
        $record = $this->findNode($id);

        return $this->renderTemplate($record, $request);
    }
1364247
public function show($id)
    {
        // Check the cache for item data. Otherwise get from the db.
        $item = Cache::rememberForever($this->modelTableName . ':' . $id, function () use ($id) {
            return call_user_func([$this->getModelClass(), 'findOrFail'], $id)->toArray();
        });

        return $this->generateResponse($this->modelTableName, $item);
    }
848746
public function views(ViewCollector $view)
    {
        $view->handle('{view}', Callback::class . '::viewHtml')
             ->where('view', 'html|alerts|pager|paginator');

        $view->handle('css.{type?}', Callback::class . '::viewCss')
             ->implicit('type', 'style')
             ->where('type', 'link|style');

        $view->handle('{view}', Callback::class . '::viewOther')
             ->where('view', 'collection|script|attributes|meta');
    }
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,
            ];
        }
    }
715471
protected function getListCollectionItem()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->collection_item->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('collection')) {
            return $this->collection_item->getList(array('collection_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->collection_item->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
100078
public function handleSort(int $item_id = null, $prev_id = null, $next_id = null, $parent_id = null): void
	{
		if ($this->isAjax()) {
			$page = $this->orm->pages->getById($item_id);
			if (!$page->isHomePage) {
				$page->parent = $parent_id;
				$this->orm->persistAndFlush($page);

				$this->orm->pages->changeSort((int) $item_id, (int) $prev_id, (int) $next_id, $this->locale);
			}
		} else {
			$this->terminate();
		}
	}
40013
public function itemShow($item_id)
    {
        $response = $this->getGuzzleClient()
            ->get('/items/' . $item_id, $this->setQuery());

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            Item::class,
            'json'
        );
    }