Marking the subscription of given ID.
@param int $id
@return Response
427033
public function actionMark($id = null)
    {
        $model = Subscription::find()->where(['id' => $id, 'user_id' => User::loggedId()])->limit(1)->one();
        if (empty($model)) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find Subscription with this ID.'));
            return $this->redirect(['profile/subscriptions']);
        }
        if ($model->post_seen == Subscription::POST_SEEN) {
            if ($model->unseen()) {
                $this->success(Yii::t('podium/flash', 'Thread has been marked unseen.'));
            } else {
                Log::error('Error while marking thread', $model->id, __METHOD__);
                $this->error(Yii::t('podium/flash', 'Sorry! There was some error while marking the thread.'));
            }
            return $this->redirect(['profile/subscriptions']);
        }
        if ($model->post_seen == Subscription::POST_NEW) {
            if ($model->seen()) {
                $this->success(Yii::t('podium/flash', 'Thread has been marked seen.'));
            } else {
                Log::error('Error while marking thread', $model->id, __METHOD__);
                $this->error(Yii::t('podium/flash', 'Sorry! There was some error while marking the thread.'));
            }
            return $this->redirect(['profile/subscriptions']);
        }
        $this->error(Yii::t('podium/flash', 'Sorry! Subscription has got the wrong status.'));
        return $this->redirect(['profile/subscriptions']);
    }
904556
public function deleteAction($id)
    {
        $subscriptionManager = $this->get('phlexible_message.subscription_manager');

        $subscription = $subscriptionManager->find($id);
        $subscriptionManager->deleteSubscription($subscription);

        return new ResultResponse(true, 'Subscription deleted.');
    }
621244
public function getUser($id)
    {
        $response = $this->client->get($this->getResourceEndpoint() . '/' . (int)$id);

        return $response['Response'][0]['UserCompany'];
    }
934136
public function actionDelete($id = null)
    {
        $model = Subscription::find()->where(['id' => (int)$id, 'user_id' => User::loggedId()])->limit(1)->one();
        if (empty($model)) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find Subscription with this ID.'));
            return $this->redirect(['profile/subscriptions']);
        }
        if ($model->delete()) {
            $this->module->podiumCache->deleteElement('user.subscriptions', User::loggedId());
            $this->success(Yii::t('podium/flash', 'Thread has been unsubscribed.'));
        } else {
            Log::error('Error while deleting subscription', $model->id, __METHOD__);
            $this->error(Yii::t('podium/flash', 'Sorry! There was some error while deleting the subscription.'));
        }
        return $this->redirect(['profile/subscriptions']);
    }
82875
public function edit($id)
	{
		return $this->response()
			->view($this->getView('edit'), [
				'entity' => $this->getModel()->getRepository()->getById($id)
			]);
	}
600464
public function show($id)
    {
        $person = $this->client->get(sprintf('people/%d.json', $id));

        return new Person($this->response($person));
    }
206942
public function actionRead($id)
    {
        $notification = $this->getNotification($id);

        $notification->seen = 1;
        $notification->save();

        return $notification;
    }
273111
public function onceUsingId($id)
    {
        $this->setUser($this->provider->retrieveById($id));

        return $this->user instanceof UserContract;
    }
887453
public function show($id)
    {
        $webhook = $this->client->get(
            sprintf('buckets/%d/webhooks/%d.json', $this->bucket, $id)
        );
        $webhook = new Webhook($this->response($webhook));
        $webhook->inContext($this->bucket);

        return $webhook;
    }
1236665
public function reactivate($id)
    {
        $service = $this->getService();

        // this PUT request accepts a query string of 'include_trial'
        $params = array();
        $includeTrial = $this->getParam('include_trial');
        if (is_int($includeTrial)) {
            $params['include_trial'] = $includeTrial;
        }

        $response = $service->request('subscriptions/' . (int)$id . '/reactivate', 'PUT', '', $params);
        $responseArray = $this->getResponseArray($response);

        $code = $response->getStatusCode();

        /**
         * add some more errors for a bad response code. errors will be in the body of the response
         *
         * @todo Plead with Chargify for more consistent error throwing. Sometimes errors
         * are keyed by 'errors' in the response body. Sometimes (as in this case) you just get a
         * zero indexed array. Would be nice if keying was consistent and if errors had unique codes.
         */
        if ('200' != $code) {
            $this->_errors[] = $responseArray;
        }

        if (!$this->isError()) {
            $this->_data = $responseArray['subscription'];
        } else {
            $this->_data = array();
        }

        return $this;
    }
739872
public function show($id)
    {
        $document = $this->client->get(
            sprintf('buckets/%d/documents/%d.json', $this->bucket, $id)
        );

        return new Document($this->response($document));
    }
1257948
public function show($id = null)
    {
        if ($id === 'new') {
            return response()->json([
                'entry' => WinkTag::make([
                    'id' => Str::uuid(),
                ]),
            ]);
        }

        $entry = WinkTag::findOrFail($id);

        return response()->json([
            'entry' => $entry,
        ]);
    }
943584
public function indexAction($id)
    {
        /** @var \ProjetNormandie\PictureBundle\Entity\Picture $picture */
        $picture = $this->getDoctrine()->getRepository('ProjetNormandiePictureBundle:Picture', 'picture')->find($id);

        if ($picture) {
            $response = new StreamedResponse(function () use ($picture) {
                echo stream_get_contents($picture->getFile());
            });
            $response->headers->set('Content-Type', $picture->getType());

            return $response;
        }

        return new Response(null, '404');
    }
230198
public function show($id)
    {
        $message = $this->client->get(
            sprintf('buckets/%d/messages/%d.json', $this->bucket, $id)
        );

        return new Message($this->response($message));
    }
963082
public function cancelDelayed($id)
    {
        $this->setCancelAtEndOfPeriod(true);

        $service = $this->getService();
        $rawData = $this->getRawData(array('subscription' => $this->_params));
        $response = $service->request('subscriptions/' . (int)$id, 'PUT', $rawData);
        $responseArray = $this->getResponseArray($response);

        if (!$this->isError()) {
            $this->_data = $responseArray['subscription'];
        } else {
            $this->_data = array();
        }

        return $this;
    }
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));
    }
691552
public function show($id)
    {
        $newsletter = $this->newsletter->find($id);
        
        return view('newsletter::Frontend.show')->with(['newsletter' => $newsletter]);
    }