View method

@param string|null $id Cms Term id.
@return void
@throws \Cake\Network\Exception\NotFoundException When record not found.
969636
public function view($id = null)
    {
        $cmsTerm = $this->CmsTerm->get($id, [
            'contain' => ['CmsPermission']
        ]);
        $this->set('cmsTerm', $cmsTerm);
        $this->set('_serialize', ['cmsTerm']);
    }
503975
public function run($id)
    {
        /** @var ActiveRecord $model */
        $model = new $this->modelClass;

        /*
         * Locate the supplied model, left, right and parent models
         */
        $pkAttribute = $model->getTableSchema()->primaryKey[0];

        /** @var ActiveRecord|NestedSetsBehavior $model */
        $model = $model::find()->where([$pkAttribute => $id])->one();

        if ($model == null) {
            throw new NotFoundHttpException('Node not found');
        }

        $model->deleteWithChildren();

        return null;
    }
1366292
public function view(?string $id = null)
    {
        $calendarAttendee = $this->CalendarAttendees->get($id, [
            'contain' => ['CalendarEvents']
        ]);

        $this->set(compact('calendarAttendee'));
        $this->set('_serialize', ['calendarAttendee']);
    }
990170
public function view($id = null)
    {
        $ticket = $this->Tickets->get($id, [
            'contain' => []
        ]);

        $this->set('ticket', $ticket);
        $this->set('_serialize', ['ticket']);
    }
992818
public function actionShow($id, $slug)
    {
        $model = $this->model->node($id);
        if (empty($model) || !$model->is_visible || $model->slug != $slug) {
            throw new NotFoundHttpException(Yii::t($this->tcModule, 'Content not found'));
        }
        
        return $this->actionView($id, true, null, true, false, true);
    }
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,
        ]);
    }
320685
public static function view_entry($id) {
        global $DB, $USER;

        $params = self::validate_parameters(self::view_entry_parameters(), array('id' => $id));
        $id = $params['id'];
        $warnings = array();

        // Get and validate the glossary.
        $entry = $DB->get_record('glossary_entries', array('id' => $id), '*', MUST_EXIST);
        list($glossary, $context, $course, $cm) = self::validate_glossary($entry->glossaryid);

        if (!glossary_can_view_entry($entry, $cm)) {
            throw new invalid_parameter_exception('invalidentry');
        }

        // Trigger view.
        glossary_entry_view($entry, $context);

        return array(
            'status' => true,
            'warnings' => $warnings
        );
    }
1363061
public function view($id = null) {
        $task = $this->Tasks->get($id, [
            'contain' => ['Roles']
        ]);
        $this->set('task', $task);
        $this->set('_serialize', ['task']);
    }
1076853
protected function throwModelNotFoundException($id)
    {
        throw new ModelNotFoundException('Model not found for ID ' . $id . ' on table ' . $this->container->make($this->getModelName())->getTable());
    }
515664
public function actionShow($id = null)
    {
        if (!is_numeric($id) || $id < 1) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find the post you are looking for.'));
            return $this->redirect(['forum/index']);
        }

        $post = Post::find()->where(['id' => $id])->limit(1)->one();
        if (empty($post)) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find the post you are looking for.'));
            return $this->redirect(['forum/index']);
        }

        $url = [
            'forum/thread',
            'cid' => $post->thread->category_id,
            'fid' => $post->forum_id,
            'id' => $post->thread_id,
            'slug' => $post->thread->slug
        ];

        try {
            $count = (new Query)->from(Post::tableName())->where([
                    'and',
                    ['thread_id' => $post->thread_id],
                    ['<', 'id', $post->id]
                ])->count();
            $page = floor($count / 10) + 1;
            if ($page > 1) {
                $url['page'] = $page;
            }
            $url['#'] = 'post' . $post->id;
            return $this->redirect($url);
        } catch (Exception $e) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find the post you are looking for.'));
            return $this->redirect(['forum/index']);
        }
    }
836346
public function view($id = null) {
		$queuedJob = $this->QueuedJobs->get((int)$id, [
			'contain' => ['WorkerProcesses']
		]);

		if ($this->request->getParam('_ext') && $this->request->getParam('_ext') === 'json' && $this->request->getQuery('download')) {
			$this->response = $this->response->withDownload('queued-job-' . $id . '.json');
		}

		$this->set(compact('queuedJob'));
		$this->set('_serialize', ['queuedJob']);
	}
1199428
public function edit($id = null) {
		if (!$this->Rubro->exists($id)) {
			throw new NotFoundException(__('Invalid rubro'));
		}
		if ($this->request->is(array('post', 'put'))) {
			if ($this->Rubro->save($this->request->data)) {
				$this->Flash->success(__('The rubro has been saved.'));
				return $this->redirect(array('action' => 'index'));
			} else {
				$this->Flash->error(__('The rubro could not be saved. Please, try again.'));
			}
		} else {
			$options = array('conditions' => array('Rubro.' . $this->Rubro->primaryKey => $id));
			$this->request->data = $this->Rubro->find('first', $options);
		}
		$proveedores = $this->Rubro->Proveedor->find('list');
		$this->set(compact('proveedores'));
	}
1161293
public function actionPreview($id)
    {
        $emailTemplate = $this->loadModel($id);
        echo CHtml::tag('div', array('style' => 'font-family: Arial; font-weight: bold;'), $emailTemplate->subject) . '<hr/>';
        echo $emailTemplate->message;
    }
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'));
	}
1253728
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $cmsTerm = $this->CmsTerm->get($id);
        if ($this->CmsTerm->delete($cmsTerm)) {
            $this->Flash->success('The cms term has been deleted.');
        } else {
            $this->Flash->error('The cms term could not be deleted. Please, try again.');
        }
        return $this->redirect(['action' => 'index']);
    }
807767
public function view(? string $id = null): void
    {
        $calendar = null;

        $calendar = $this->Calendars->get($id);

        $this->set('calendar', $calendar);
        $this->set('_serialize', 'calendar');
    }
453158
public function actionView($id) 
	{
		$model=$this->loadModel($id);

		$this->pageTitle = Yii::t('phrase', 'Detail Banner: {title}', array('{title}'=>$model->title));
		$this->pageDescription = '';
		$this->pageMeta = '';
		$this->render('admin_view', array(
			'model'=>$model,
		));
	}