Preview

@param  int  $id
@return \Illuminate\Http\Response
557669
public function cancel($id)
    {
        $campagne = $this->campagne->find($id);
        $this->mailjet->deleteCampagne($campagne->api_campagne_id);

        // Update campagne status
        $this->campagne->update(['id' => $campagne->id, 'status' => 'brouillon', 'updated_at' => date('Y-m-d G:i:s'), 'send_at' => null]);

        alert()->success('Envoi de la campagne annulé');

        return redirect('build/newsletter');
    }
746669
public function view($id = null) {
        $cmsContent = $this->CmsContent->get($id, [
            'contain' => ['CmsPermission', 'CmsTermRelation']
        ]);
        $this->set('cmsContent', $cmsContent);
        $this->set('_serialize', ['cmsContent']);
    }
739872
public function show($id)
    {
        $document = $this->client->get(
            sprintf('buckets/%d/documents/%d.json', $this->bucket, $id)
        );

        return new Document($this->response($document));
    }
936119
public function show($id)
    {
        $request = $this->makeRequest('show');
        $model = $this->service->get($id);
        return $this->maybeMakeResource('single', $model);

    }
1265431
public function show($id)
    {
        $item = $this->repo->getById($id);

        if ( ! $item)
        {
            return $this->respondNotFound();
        }

        return $this->response->item($item, new $this->transformerClass);
    }
810520
public function show($id) {
        if ($this->model->display_the_view_button)
        {
            return view('formhandling::adminformhandling/' . config('lasallecmsadmin.admin_template_name') . '/show',
                [
                    'display_the_view_button'      => $this->model->display_the_view_button,
                    'repository'                   => $this->repository,
                    'record'                       => $this->repository->getFind($id),
                    'package_title'                => $this->model->package_title,
                    'table_name'                   => $this->model->table,
                    'model_class'                  => $this->model->model_class,
                    'resource_route_name'          => $this->model->resource_route_name,
                    'field_list'                   => $this->getFieldList(),
                    'namespace_formprocessor'      => $this->model->namespace_formprocessor,
                    'classname_formprocessor_update' => $this->model->classname_formprocessor_update,
                    'DatesHelper'                  => DatesHelper::class,
                    'HTMLHelper'                   => HTMLHelper::class,
                    'carbon'                       => Carbon::class,
                    'Config'                       => Config::class,
                    'Form'                         => Form::class,
                    'Crypt'                        => Crypt::class,
                ]);

        } else {
            return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
        }
    }
1321061
public function actionView($id)
    {
        $this->layout = static::MAIN_LAYOUT;
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }
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,
        ]);
    }
623125
public function view($id = null) {
        $cmsContentMeta = $this->CmsContentMeta->get($id, [
            'contain' => ['CmsContent']
        ]);
        $this->set('cmsContentMeta', $cmsContentMeta);
        $this->set('_serialize', ['cmsContentMeta']);
    }
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,
        ]);
    }
1225766
public function show($id)
    {
        $messageBoard = $this->client->get(
            sprintf('buckets/%d/message_boards/%d.json', $this->bucket, $id)
        );

        return new MessageBoard($this->response($messageBoard));
    }
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'));
	}
1185606
public function show($id)
    {
        $todo = $this->client->get(
            sprintf('buckets/%d/todos/%d.json', $this->bucket, $id)
        );

        return new Todo($this->response($todo));
    }
847760
public function show($id)
    {
        $block = $this->repository->getById($id);
        if (!empty($block)) {
            $this->authorize('read', $block);
            return $this->respondWithSuccess($block, new BlockTransformer);
        }
        return $this->respondNotFound();
    }
549833
public function preview($id)
    {
        $item = app(StackRepository::class)->fetchOne((int) $id)->firstOrFail();

        if (in_array($item->notification->type->name, ['email', 'sms'])) {
            $classname    = $item->notification->type->name === 'email' ? EmailNotification::class : SmsNotification::class;
            $notification = app($classname);
            $notification->setModel($item);
            return view('antares/notifications::admin.logs.preview', ['content' => $notification->render()]);
        }

        $decorator = app(SidebarItemDecorator::class);
        $decorated = $decorator->item($item, config('antares/notifications::templates.notification'));
        return new JsonResponse(['content' => $decorated], 200);
    }
911794
public function preview($entity, $id)
    {
        $modelString = 'Grafite\Cms\Models\\'.ucfirst($entity);

        if (!class_exists($modelString)) {
            $modelString = 'Grafite\Cms\Models\\'.ucfirst($entity).'s';
        }

        $model = new $modelString();
        $modelInstance = $model->find($id);

        $data = [
            $entity => $modelInstance,
        ];

        if (config('app.locale') != config('cms.default-language', Cms::config('cms.default-language'))) {
            if ($modelInstance->translation(config('app.locale'))) {
                $data = [
                    $entity => $modelInstance->translation(config('app.locale'))->data,
                ];
            }
        }

        $view = 'cms-frontend::'.$entity.'.show';

        if (!View::exists($view)) {
            $view = 'cms-frontend::'.$entity.'s.show';
        }

        if ($entity === 'page') {
            $view = 'cms-frontend::pages.'.$modelInstance->template;
        }

        if ($entity === 'blog') {
            $view = 'cms-frontend::blog.'.$modelInstance->template;
        }

        return view($view, $data);
    }
1008925
public function actionView($id)
    {
        $model = $this->findModel($id);
        if ($model && ($model->isPublic() || $model->isAuthor())) {
            return $this->render('view', [
                'model' => $model,
            ]);
        } else {
            Yii::$app->session->setFlash('success', Yii::t('note', 'Note does not exist.'));
            return $this->redirect(['index',]);
        }
    }