Displays a particular model.
@param integer $id the ID of the model to be displayed
324235
public function actionRunaction() {
        $id       = $_POST['trash_id'];
        $criteria = null;
        $actions  = Yii::app()->getRequest()->getParam('action');

        if(count($id) > 0) {
			$criteria = new CDbCriteria;
			$criteria->addInCondition('id', $id);

			if($actions == 'publish') {
			    OmmuPages::model()->updateAll(array(
			        'published' => 1,
			    ),$criteria);
			} elseif($actions == 'unpublish') {
			    OmmuPages::model()->updateAll(array(
			        'published' => 0,
			    ),$criteria);
			} elseif($actions == 'trash') {
			    OmmuPages::model()->updateAll(array(
			        'published' => 2,
			    ),$criteria);
			} elseif($actions == 'delete') {
			    OmmuPages::model()->deleteAll($criteria);
			}
        }

        // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
        if(!Yii::app()->getRequest()->getParam('ajax')) {
			$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('manage'));
        }
    }
1179106
public function show($id)
    {
        $entry = $this->entriesRepository->getById($id, $this->resource);

        return view('laramanager::entries.show')
            ->with('resource', $this->resource)
            ->with('entry', $entry)
            ->with('objects', LaramanagerObject::all());
    }
1303249
public function actionView($id)
    {
        $model = $this->findModel($id);
        $modelsI18n = $model->prepareI18nModels();

        if ($model->pageSize > 0) {
            $model->orderBy = $model::$defaultOrderBy;
            $model->page = $model->calcPage();
        }

        // build frontend links
        $lh = $this->module->langHelper;
        $editAllLanguages = empty($this->module->params['editAllLanguages'])
                          ? false : $this->module->params['editAllLanguages'];
        $languages = $lh::activeLanguages($editAllLanguages);
        if (Yii::$app instanceof UniApplication && Yii::$app->type == UniApplication::APP_TYPE_BACKEND) {
            $containerModule = $this->module->module;
            if ($containerModule instanceof UniModule && array_key_exists(static::$sysAppModel, $containerModule->models)) {
                $appModel = $containerModule::model(static::$sysAppModel);
                $appFront = $appModel::initFrontendApplication();  // for backend application init separate frontend-application
              //$appFront->urlManager->baseUrl = 'http://www.mysite.com';  // frontend domain - set from app-params
            }
        }
        $moduleUid = $this->module->uniqueId;
        $frontendLinks = [];
        foreach ($languages as $langCode => $lang) {
            $frontendLinks[$langCode] = '';
            if ($model->hasInvisibleParent()) {
                if (empty($model->route)) {
                    $frontendLinks[$langCode] = Url::toRoute(["/{$moduleUid}/main/show", 'id' => $model->id, 'slug' => $model->slug]);
                } else {  // external/internal link
                    $frontendLinks[$langCode] = ContentMenuBuilder::routeToLink($model->route);
                }
            } else {
                $frontendLinks[$langCode] = Url::toRoute(["/{$moduleUid}/main/view"
                  , 'id' => $model->id, 'lang' => $langCode], true);
            }
        }
        if (!empty($appModel)) $appModel::restoreApplication();

        return $this->render('view', compact('model', 'modelsI18n', 'frontendLinks'));
    }
1093642
public function show($id)
    {
        $template = $this->client->get(sprintf('templates/%d.json', $id));

        return new Template($this->response($template));
    }
1285394
public function actionView($id)
{
\Yii::$app->session['__crudReturnUrl'] = Url::previous();
Url::remember();
Tabs::rememberActiveState();

return $this->render('view', [
'model' => $this->findModel($id),
]);
}
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
438475
public function show($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        $this->checkListParents(false);

        return view($this->getShowView(), [
            'moduleKey'           => $this->moduleKey,
            'routePrefix'         => $this->routePrefix,
            'permissionPrefix'    => $this->permissionPrefix,
            'model'               => $this->modelInformation,
            'record'              => $record,
            'recordReference'     => $this->getReferenceRepository()->getReferenceForModel($record),
            'fieldStrategies'     => $this->renderedShowFieldStrategies($record),
            'hasActiveListParent' => (bool) $this->listParentRelation,
            'topListParentOnly'   => $this->showsTopParentsOnly(),
            'listParents'         => $this->listParents,
        ]);
    }
516069
public function view($id = null) {
        $cmsTermTaxonomy = $this->CmsTermTaxonomy->get($id, [
            'contain' => ['CmsTerm', 'CmsTermRelation']
        ]);
        $this->set('cmsTermTaxonomy', $cmsTermTaxonomy);
        $this->set('_serialize', ['cmsTermTaxonomy']);
    }
518350
public function view($id = null)
    {
        $user = $this->Users->get($id);
        $this->set('user', $user);

        $this->render(Configure::read('CM.AdminUserViews.view'));
    }
182028
public function show($id) {

        // $id can be an integer -- the actual ID of the PEOPLES table; or,
        // $id can be a string, in the format "Firstname@Lastname"
        $peopleID = $this->helpers->determinePeopleID($id);

        if (!$this->helpers->isAllowedPeopleIdSingleContactDisplay($peopleID)) {
            return redirect()->back();
        }

        $people    = $this->peopleRepository->getFind($peopleID);
        $email     = $this->peopleRepository->getFirstWorkEmail($peopleID);
        $telephone = $this->peopleRepository->getFirstWorkTelephone($peopleID);

        return view('lasallecrmcontact::single_crmcontact_basic', [
            'people'                              => $people,
            'email'                               => $email,
            'telephone'                           => $telephone,
            'single_contact_display_contact_form' => Config::get('lasallecrmcontact.single_contact_display_contact_form'),
            'Config'                              => Config::class,
        ]);
    }
276796
public function view(string $id)
    {
        $this->request->allowMethod('get');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $this->set('success', null !== $entity);
        null !== $entity ?
            $this->set('data', $entity) :
            $this->set('error', sprintf('Failed to fetch saved search for record with ID "%s".', $id));
        $this->set('_serialize', ['success', 'data', 'error']);
    }
1363061
public function view($id = null) {
        $task = $this->Tasks->get($id, [
            'contain' => ['Roles']
        ]);
        $this->set('task', $task);
        $this->set('_serialize', ['task']);
    }
623125
public function view($id = null) {
        $cmsContentMeta = $this->CmsContentMeta->get($id, [
            'contain' => ['CmsContent']
        ]);
        $this->set('cmsContentMeta', $cmsContentMeta);
        $this->set('_serialize', ['cmsContentMeta']);
    }
1366292
public function view(?string $id = null)
    {
        $calendarAttendee = $this->CalendarAttendees->get($id, [
            'contain' => ['CalendarEvents']
        ]);

        $this->set(compact('calendarAttendee'));
        $this->set('_serialize', ['calendarAttendee']);
    }
1261381
public function run($id)
    {
        $model = $this->getModel($id);

        return $this->controller->render($this->view, [
            $this->nameVariableModel => $model,
        ]);
    }
376468
public function show($id)
    {
        try {
            $thread = Thread::findOrFail($id);
        } catch (ModelNotFoundException $e) {
            Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');

            return redirect('message');
        }

        // show current user in list if not a current participant
        // $users = User::whereNotIn('id', $thread->participantsUserIds())->get();

        // don't show the current user in list
        $userId = Auth::user()->id;
        $users = User::whereNotIn('id', $thread->participantsUserIds($userId))->get();

        $thread->markAsRead($userId);

        return view('chat.show', compact('thread', 'users'));
    }
310691
public function render($id)
    {
        $meta = $this->profile->getMeta($id);

        $this->getField()->getManager()->renderPreview(
            Arr::get($meta, $this->path)
        );
    }