View method

@param string $id
@return void
@throws \Cake\Network\Exception\NotFoundException
490376
public function view($id = null) {
		$block = $this->Blocks->get($id, [
			'contain' => []
		]);
		$this->set('block', $block);
	}
1113562
public function view(string $id = null): void
    {
        $menu = $this->Menus->get($id, [
            'contain' => [
                'MenuItems' => function ($q) {
                    return $q->order(['MenuItems.lft' => 'ASC']);
                }
            ]
        ]);

        if ($menu->get('menu_items')) {
            $tree = TableRegistry::getTableLocator()->get('Menu.MenuItems')
                ->find('treeList', ['spacer' => self::TREE_SPACER])
                ->where(['MenuItems.menu_id' => $menu->id])
                ->toArray();
            // create node property in the entity object
            foreach ($menu->get('menu_items') as $menuItem) {
                if (!array_key_exists($menuItem->id, $tree)) {
                    continue;
                }
                $menuItem->node = $tree[$menuItem->id];
            }
        }

        $this->set('navMenu', $menu);
        $this->set('_serialize', ['navMenu']);
    }
534066
public function actionView($id)
    {
        $model = $this->findModel($id);
        $model->updateCounters(['views' => 1]);
        return $this->render($model->view, [
            'model' => $model,
        ]);
    }
1108081
public function actionShow($id) {
    $profile = Profile::find()->byId($id)->one();

    if ($profile === null) {
      throw new NotFoundHttpException();
    }

    return $this->render('show', [
      'profile' => $profile,
    ]);
  }
1171074
public function show($id)
	{
		if ( Shinobi::canAtLeast( [ config('watchtower.acl.role.edit', false),  config('watchtower.acl.role.show', false)] ) ) {
			$resource = Role::findOrFail($id);
			$show = "1";
			$route = $this->route;
			return view( config('watchtower.views.roles.show'), compact('resource','show','route') );
		}

		return view( config('watchtower.views.layouts.unauthorized'), [ 'message' => 'view roles' ]);
	}
889990
public function view($id)
    {
        $component = $this->processor->view($id);

        return response($component['component']->__toString(), 200);
    }
876927
public function show($id)
    {
        $lists = $this->list->getAll();
        $list  = $this->list->find($id);

        return view('newsletter::Backend.lists.emails')->with(['lists' => $lists, 'list' => $list]);
    }
1144462
public function preview($id)
	{
		if ( ! $this->auth->check())
		{
			return App::abort(404, 'Page not found');
		}

		return View::make($this->theme.'.preview', array('id' => $id));
	}
1171253
public function view($id = null) {
		$cell = $this->Cells->get($id, [
			'contain' => []
		]);
		$this->set('cell', $cell);
	}
1144655
public function viewAction($id)
    {
        $gallery = $this->get('sonata.media.manager.gallery')->findOneBy([
            'id' => $id,
            'enabled' => true,
        ]);

        if (!$gallery) {
            throw new NotFoundHttpException('unable to find the gallery with the id');
        }

        return $this->render('@SonataMedia/Gallery/view.html.twig', [
            'gallery' => $gallery,
        ]);
    }
1283825
public function actionEdit(int $id): void
	{
		$this->page = $this->orm->pages->getById($id);
		if (!$this->page) {
			$this->error();
		}

		$gallery = $this['gallery'];
		$gallery->setStorage($this->orm->pagesGalleries);
		$gallery->setForeignKey('page', $this->page->id);
		$gallery->setNamespace('page/' . $this->page->url);
	}
1056382
public function view($id = null)
    {
        $cmsTermRelation = $this->CmsTermRelation->get($id, [
            'contain' => ['CmsTermTaxonomy', 'CmsContent']
        ]);
        $this->set('cmsTermRelation', $cmsTermRelation);
        $this->set('_serialize', ['cmsTermRelation']);
    }
112754
public function view($type = null, $id = null)
    {
        $this->_validateActionIsEnabled('view');

        $this->_event('beforeView', [
            'id' => $id
        ]);

        $data = $this->Model->get($id, [
            'contain' => $this->type['contain']
        ]);
        $this->set('data', $data);

        $this->_event('afterView', [
            'id' => $id
        ]);
    }
477944
public function show($id)
	{
		$entity = $this->getModel()->getRepository()->getById($id);

		return $this->response()
			->item($entity)
			->view($this->getView('show'), [
				'entity' => $entity
			]);
	}
1063744
public function view($id = null) {
		if (!$this->Printer->exists($id)) {
			throw new NotFoundException(__('Invalid printer'));
		}
		$options = array('conditions' => array('Printer.' . $this->Printer->primaryKey => $id));
		$this->set('printer', $this->Printer->find('first', $options));
	}
1068312
public function show($id)
    {
      $role = Role::with('permissions')->findOrFail($id);
      return \View::make('admin.roles.show', compact('role'));
    }
298130
public function showAction($id = null)
    {
        if (false === $this->admin->checkAccess('VIEW')) {
            throw new AccessDeniedException();
        }

        $media = $this->admin->getObject($id);

        if (!$media) {
            throw new NotFoundHttpException('unable to find the media with the id');
        }

        return $this->renderWithExtraParams(
            '@NetworkingInitCms/MediaAdmin/show.html.twig',
            [
                'media' => $media,
                'formats' => $this->get('sonata.media.pool')->getFormatNamesByContext($media->getContext()),
                'format' => $this->getRequest()->get('format', 'reference'),
                'base_template' => $this->getBaseTemplate(),
                'admin' => $this->admin,
                'security' => $this->get('sonata.media.pool')->getDownloadStrategy($media),
                'action' => 'view',
                'pixlr' => $this->container->has('sonata.media.extra.pixlr') ? $this->container->get(
                    'sonata.media.extra.pixlr'
                ) : false,
            ]
        );
    }