Displays a single Assigment model.
@param integer $id
@return mixed
506171
public function actionView($id)
    {
        $model = $this->findModel($id);
        $authManager = Yii::$app->authManager;
        $avaliable = [];
        foreach ($authManager->getRoles() as $role) {
            $avaliable[$role->name] = $role->name;
        }
        $assigned = [];
        foreach ($authManager->getRolesByUser($id) as $role) {
            $assigned[$role->name] = $role->name;
            unset($avaliable[$role->name]);
        }
        return $this->render('view', [
                'model' => $model,
                'avaliable' => $avaliable,
                'assigned' => $assigned,
                'idField' => $this->idField,
                'usernameField' => $this->usernameField,
        ]);
    }
255096
public function getById($id)
    {
        $query = function () use ($id) {
            return $this->model
                ->with($this->requiredRelationships)
                ->find($id);
        };

        return $this->doQuery($query);
    }
772210
public function getById($id)
    {
        $model = $this
            ->prepareQuery()
            ->where($this->model->getTable() . '.id', $id)
            ->first();

        if (empty($model))
            return null;

        $model = $this->addPermissionsForModel($model);

        return $this->formatModel($model);
    }
598931
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerWarehouseVoucherItems = new \yii\data\ArrayDataProvider([
            'allModels' => $model->warehouseVoucherItems,
        ]);

        return $this->render('view', [
            'model'                         => $this->findModel($id),
            'providerWarehouseVoucherItems' => $providerWarehouseVoucherItems,
        ]);
    }
534066
public function actionView($id)
    {
        $model = $this->findModel($id);
        $model->updateCounters(['views' => 1]);
        return $this->render($model->view, [
            'model' => $model,
        ]);
    }
832849
public function showArticle($id)
    {
        try {
            $post = Article::with('user', 'category')
                           ->whereId(intval($id))
                           ->orWhere('slug', $id)
                           ->firstOrFail();

            $view = \Config::get('admin.views.post');

            return \View::make($view, compact('post'));
        } catch (ModelNotFoundException $e) {
            return \App::abort(404);
        }
    }
828959
public function show($id)
    {
        $campagne = $this->campagne->find($id);
        $blocs    = $this->type->getAll();

        return view('newsletter::Backend.campagne.show')->with(['campagne' => $campagne, 'blocs' => $blocs]);
    }
110133
public function show($id)
    {
        $component = $this->component($id)->templateLayout();
        $html      = $component->__toString();
        if (!strlen($html)) {
            return $component->render();
        }
        return $html;
    }
56626
public function actionView($id)
    {
        $model = $this->findModel($id);
        $modelsI18n = $model::prepareI18nModels($model);

        if ($model->pageSize > 0) {
            $model->orderBy = $model->defaultOrderBy;
            $model->page = $model->calcPage();//echo __METHOD__.": calcPage(id={$id},pageSize={$model->pageSize})={$model->page}<br>";exit;
        }

        return $this->render('view', [
            'model' => $model,
            'modelsI18n' => $modelsI18n,
        ]);
    }
648626
public function show($id)
    {
        $options = $this->getParams('includes');

        $product = Subbly::api('subbly.product')->find($id, $options);

        return $this->jsonResponse(array(
            'product' => $this->presenter->single($product),
        ));
    }
1032396
public function show($id)
    {
      $user  = $this->users->findOrFail($id);
      return \View::make('admin.users.show', [
        'user'              =>  $user,
        'title'              => 'view',
      ]);
    }
310123
public function get($id = null){
        if(!is_null($id)){
            return $this->find($id);
        }
        return $this->model->get();
    }
1209549
public function view($id = null) {
		if (empty($id)) {
			$this->Flash->error(__('record invalid'));
			return $this->Common->autoRedirect(['action' => 'index']);
		}
		$mimeType = $this->MimeTypes->get($id);
		if (empty($mimeType)) {
			$this->Flash->error(__('record not exists'));
			return $this->Common->autoRedirect(['action' => 'index']);
		}
		$this->set(compact('mimeType'));
	}
4502
public function actionView(int $id)
    {
        $model = $this->findModel($id);

        return $this->render('view', [
            'model' => $model,
            'usernameField' => $this->usernameField,
        ]);
    }
147007
protected function getModel ($id) {
		return isset ($this->models[$id]) ? $this->models[$id] : null;
	}
1070516
public function show($id)
    {
        $parameters = $this->request->getParameters();
        $model = $this->repository->getItem($id, $parameters);
        return $this->modelResponse($model);
    }
725486
public function actionRaw($id)
    {
        $model = $this->findModel($id);
        if ($model && ($model->isPublic() || $model->isAuthor())) {
            Yii::$app->response->format = Response::FORMAT_RAW;
            return $model->content;
        } else {
            Yii::$app->session->setFlash('success', Yii::t('note', 'Note does not exist.'));
            return $this->redirect(['index']);
        }
    }