Displays a single Post model.
@param integer $id
@return mixed
421924
public function actionView($id)
	{
		//get the model, to use it within the meta tags
		$model = $this->findModel($id);
		//setting the meta keywords for this page
		$tok = new ClassifierBasedTokenizer(
	    new EndOfSentence(),
	    new WhitespaceTokenizer()
		);
		$text = strip_tags($model->content);
		$sentences = $tok->tokenize($text);
		if(is_array($sentences) && array_key_exists(0, $sentences))
		{			
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . substr($sentences[0],0,100)
	            ],
	            'keywords'
	        );
		}
		else{
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . $text
	            ],
	            'keywords'
	        );
		}

		$this->view->registerMetaTag(
            [
                'name'    => 'metakeywords',
                'content' => $model->tags
            ],
            'keywords'
        );

		return $this->render('onlineview', [
			'model' => $model,
		]);
	}
892257
public function actionView($id)
    {
        $model = $this->findModel($id);
        return $this->render('view', [
            'model' => $model,
            'idField' => $this->idField,
            'usernameField' => $this->usernameField,
            'fullNameField' => $this->fullNameField,
        ]);
    }
564227
protected function findModel($id)
    {
        if (($model = \yongtiger\admin\models\Log::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
904245
protected function findModel($id)
    {
        if (($model = Product::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
1013434
public function findModel($id)
    {
        if (($model = Category::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException (Yii::t('system', 'The requested page does not exist.'));
        }
    }
538117
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerTerm = new \yii\data\ArrayDataProvider([
            'allModels' => $model->terms,
        ]);

        return $this->render('view', [
            'model'        => $this->findModel($id),
            'providerTerm' => $providerTerm,
        ]);
    }
682096
private function loadModel($id=NULL)
	{
		if ($id === NULL)
			throw new CHttpException(400, Yii::t('Api.content', 'Missing id'));

		$model = Content::model()->findByPk($id);
		if ($model === NULL)
			throw new CHttpException(404, Yii::t('Api.content', 'An entry with the id of {{id}} was not found', array('{{id}}' => $id)));

		return $model;
	}
889990
public function view($id)
    {
        $component = $this->processor->view($id);

        return response($component['component']->__toString(), 200);
    }
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);
        }
    }
160045
public static function from( $id )
	{
		if ( empty( $id ) ) return;

		$output = new Collection();

		$reference = new self();

		$results = \get_children( array(
			'post_parent' => $id,
			'post_type'   => $reference->type,
			'numberposts' => -1,
			'post_status' => $reference->status
		), ARRAY_A );

		foreach ($results as $post_id => $post) {
			$model = new self();

			$output[] = $model->from_post( $post );
		}

		return $output;
	}
882864
public function getShow($id)
    {
        $response = $this->modelService->getBy($id);

        //return resource listing view
        return view(\OogleeUConfig::get('config.user_view.view'), compact('response'));
        
    }
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);
    }
409803
public function getView($id)
    {

        $model = (!empty($id) || $id === "0") ? $this->findAutoDetectTranslation($id) : $this->model;
        $form  = FormBuilder::create(get_class($this->form), [
            'model' => $model
        ]);

        $form_content = view('form-builder::form.components.formgenerator.info', [
            'form'  => $form,
            'id'    => $id,
            'route' => $this->getControllerNameForAction().'@',
        ]);

        $this->layoutManager->add([
            'content' => view('expendable::admin.form.state.form', [
                'form' => $form_content
            ])
        ]);

        return $this->layoutManager->render();

    }
845608
public function actionImages($id)
    {
        $gallery = $this->findModel($id);

        $searchModel  = $this->module->manager->createGalleryImageSearch();
        $dataProvider = $searchModel->search($_GET, $id);

        return $this->render('image/index', [
            'gallery' => $gallery,
            'dataProvider' => $dataProvider,
            'searchModel'  => $searchModel,
        ]);
    }
181943
public function show($id = null)
    {
        if ($id === 'new') {
            return response()->json([
                'entry' => WinkPost::make(['id' => Str::uuid(), 'publish_date' => now()->format('Y-m-d H:i:00')]),
            ]);
        }

        $entry = WinkPost::with('tags')->findOrFail($id);

        return response()->json([
            'entry' => $entry,
        ]);
    }
337827
public function getModelByPrimaryKey($id)
    {
        foreach($this->models as $model)
        {
            $primaryKey = $model->getKeyName();
            if($model->$primaryKey == $id)
                return $model;
        }
    }
174001
protected function findModel($id)
    {
        if (($model = TermOfProductType::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }