Generate content for unsubscribe column.

@param \tool_monitor\subscription $sub subscription object
@return string html used to display the unsubscribe field.
195705
public function col_unsubscribe(\tool_monitor\subscription $sub) {
        global $OUTPUT, $CFG;

        $deleteurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/index.php', array('subscriptionid' => $sub->id,
                'action' => 'unsubscribe', 'courseid' => $this->courseid, 'sesskey' => sesskey()));
        $icon = $OUTPUT->render(new \pix_icon('t/delete', get_string('deletesubscription', 'tool_monitor')));

        return \html_writer::link($deleteurl, $icon, array('class' => 'action-icon'));
    }
782726
@Override
    public void unsubscribe(String subName) throws JMSRuntimeException, InvalidDestinationRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "unsubscribe", new Object[] { subName });
        try {
            jmsSession.unsubscribe(subName);
        } catch (InvalidDestinationException ide) {
            throw (InvalidDestinationRuntimeException) JmsErrorUtils.getJMS2Exception(ide, InvalidDestinationRuntimeException.class);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "unsubscribe");
        }
    }
6388
public function postSubscribe()
    {
        $email = Binput::get('email');
        $subscriptions = Binput::get('subscriptions');
        $verified = app(Repository::class)->get('setting.skip_subscriber_verification');

        try {
            $subscription = execute(new SubscribeSubscriberCommand($email, $verified));
        } catch (ValidationException $e) {
            return cachet_redirect('status-page')
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))
                ->withErrors($e->getMessageBag());
        }

        if ($subscription->is_verified) {
            return cachet_redirect('status-page')->withSuccess(trans('cachet.subscriber.email.already-subscribed', ['email' => $email]));
        }

        return cachet_redirect('subscribe.manage', $subscription->verify_code)
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
    }
1195107
protected function processUnsubscribe(Session $session, UnsubscribeMessage $msg)
    {
        $subscription = false;
        // should probably be more efficient about this - maybe later
        /** @var SubscriptionGroup $subscriptionGroup */
        foreach ($this->subscriptionGroups as $subscriptionGroup) {
            $result = $subscriptionGroup->processUnsubscribe($session, $msg);

            if ($result !== false) {
                $subscription = $result;
            }
        }

        if ($subscription === false) {
            $errorMsg = ErrorMessage::createErrorMessageFromMessage($msg);
            $session->sendMessage($errorMsg->setErrorURI('wamp.error.no_such_subscription'));

            return;
        }
    }
440825
public function removeSubscriber(SubscriberInterface $instance) {

		// check for object hash

		if(FALSE !== ($pos = array_search(spl_object_hash($instance), $this->registeredHashes))) {
		
			// remove instance from registry before re-inserting
			
			unset($this->registeredHashes[$pos]);

			foreach($instance::getEventsToSubscribe() as $eventName => $parameters) {
			
				$methodName	= array_shift($parameters);
				$callable = array($instance, $methodName);
			
				foreach($this->registry[$eventName] as $priority => $subscribers) {
						
					if (false !== ($pos = array_search($callable, $subscribers, TRUE))) {
						unset(
							$this->registry[$eventName][$priority][$pos],
							$this->sortedRegistry[$eventName]
						);
					}

				}
			}
		}
	}
2361
public function getSubscriptionByExtUid($subscriptionExtUid)
    {
        /** @var SubscriptionFbApi $response */
        $response = $this->call(new Request('subscription.get', array('subscription_ext_uid' => $subscriptionExtUid)), 'DVelopment\FastBill\Model\SubscriptionFbApi');
        $subscriptions = $response->getResponse()->getSubscriptions();

        return reset($subscriptions);
    }
1141872
public function unsubscribe(Subscription $subscription)
    {
        if (!$this->isConnected) {
            return new RejectedPromise(new \LogicException('The client is not connected.'));
        }

        return $this->startFlow(new OutgoingUnsubscribeFlow([$subscription], $this->identifierGenerator));
    }
1111671
public function getUnsubscribeFrame($destination, $subscriptionId = null)
    {
        $frame = $this->createFrame('UNSUBSCRIBE');
        $frame['destination'] = $destination;
        $frame['id'] = $subscriptionId;
        return $frame;
    }
1146705
public function removeSubscription(\HarvestCloud\CoreBundle\Entity\ProductSubscription $subscription)
    {
        $this->subscriptions->removeElement($subscription);
    }
421738
public function handle(UnsubscribeSubscriberCommand $command)
    {
        $subscriber = $command->subscriber;

        // First remove subscriptions.
        $subscriber->subscriptions()->delete();

        event(new SubscriberHasUnsubscribedEvent($subscriber));

        // Then remove the subscriber.
        $subscriber->delete();
    }
858189
public function newSubscription(string $subscription, string $plan): SubscriptionBuilder
    {
        return new SubscriptionBuilder($this, $subscription, $plan);
    }
153114
private function changeSubscription($subscription, $type)
    {
        if ($subscription->getSubscriberEmail()) {
            $this
                ->filterEmail($subscription->getSubscriberEmail())
                ->filterCustomer($subscription->getCustomerId());

            if ($this->customerModelConfigShare->isWebsiteScope()) {
                $this
                    ->joinWebsite()
                    ->filterWebsite($subscription->getWebsiteId());
            }

            /** @var Subscriber $subscriber |bool */
            $subscriber = $this->subscriptionCollection->fetchItem();

            if (!$subscriber) {
                if ($type !== Subscriber::STATUS_SUBSCRIBED) {
                    return false;
                }

                $subscriber = $this->subscriberFactory->create();
            }

            foreach ($subscription->getData() as $key => $value) {
                $subscriber->setData($key, $value);
            }

            $subscriber->setStatus($type);
            $subscriber->setStatusChanged(true);

            $subscriber->save();
            return true;
        }
        return false;
    }
1014952
public function subscribers(Request $request)
    {
        $order  = $request->input('order');
        $search = $request->input('search',null);
        $search = ($search ? $search['value'] : null);

        return $this->subscriber->get_ajax(
            $request->input('draw'), $request->input('start'), $request->input('length'), $order[0]['column'], $order[0]['dir'], $search
        );
    }
717177
public function deleteSubscription($subscriptionId)
    {
        $stmt = $this->pdo->prepare('DELETE FROM '.$this->calendarSubscriptionsTableName.' WHERE id = ?');
        $stmt->execute([$subscriptionId]);
    }
957173
public function updateSubscription($params = null)
    {
        $url = $this->instanceUrl() . '/subscription';
        list($response, $opts) = $this->_request('post', $url, $params);
        $this->refreshFrom(['subscription' => $response], $opts, true);
        return $this->subscription;
    }
268065
public function onNewsletterSubscribeFlush(NewsletterSubscriptionEvent $event)
    {
        $subscription = $event->getNewsletterSubscription();

        $this->newsletterObjectManager->persist($subscription);
        $this->newsletterObjectManager->flush($subscription);
    }
534094
private function _createSubscription(array $response)
    {
        $model = new Subscription();
        $model->setId($response['id']);
        $model->setOffer($this->_convertResponseToModel($response['offer'], 'offer'));
        $model->setLivemode($response['livemode']);
        $model->setTrialStart($response['trial_start']);
        $model->setTrialEnd($response['trial_end']);
        $model->setPeriodOfValidity($response['period_of_validity']);
        $model->setEndOfPeriod($response['end_of_period']);
        $model->setNextCaptureAt($response['next_capture_at']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setCanceledAt($response['canceled_at']);
        $model->setPayment($this->_convertResponseToModel($response['payment'], "payment"));
        $model->setClient($this->_convertResponseToModel($response['client'], "client"));
        $model->setAppId($response['app_id']);
        $model->setIsCanceled($response['is_canceled']);
        $model->setIsDeleted($response['is_deleted']);
        $model->setStatus($response['status']);
        $model->setAmount($response['amount']);
        $model->setTempAmount($response['temp_amount']);
        return $model;
    }