Set a given webhook's active state
@link https://trello.com/docs/api/webhook/#put-1-webhooks-idwebhook-active

@param string $id     the webhook's id
@param bool   $active the webhook's status

@return array
184841
public function setActive($id, $active)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/active', array('value' => $active));
    }
641289
public function show($id, $webhookId)
    {
        return $this->get($this->getPath($id).'/'.rawurlencode($webhookId));
    }
1287857
public function setId($id)
    {
        if (!is_null($id)) {
            $id = (string) $id;
        }

        $this->id = $id;
        return $this;
    }
1354565
public function active($active)
    {
        $model = $this->noInitModel;
        if (!is_string($model->statusAttribute)) {
            return $this;
        }
        return $this->andWhere([$model->statusAttribute => $active]);
    }
36171
public function setId($id)
    {
        if (($content = $this->getContent()) instanceof FormInterface) {
            $content->setId($id);
        }

        return $this;
    }
330093
public static function ban($id)
    {
        global $PPHP;
        $db = $PPHP['db'];
        $res = $db->exec("UPDATE users SET active='0' WHERE id=?", array($id));
        return $res;
    }
1319203
public function get(int $id): Webhook
    {
        return $this->loadResource(
            Webhook::class,
            sprintf(self::GET_WEBHOOK_URI, $id)
        );
    }
1284682
public function setActive($tabId = null)
    {
        $tabId = is_null($tabId) ? $this->getTabId(true) : $tabId;
        if (empty($this->tabs[$tabId])) {
            throw new Exception\InvalidArgumentException('Invalid tab id supplied.');
        }

        if (null !== $this->active) {
            $this->tabs[$this->active]['active'] = false;
        }

        $this->tabs[$tabId]['active'] = true;
        $this->active                 = $tabId;

        return $this;
    }
167775
public function setClosed($id, $closed = true)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/closed', array('value' => $closed));
    }
107158
public function findActive($id)
    {
        $client = $this->find($id);

        return $client && ! $client->revoked ? $client : null;
    }
395423
protected function buildActive(array $active)
    {
        $active[2] = array_merge_recursive(
            $active[2],
            ['class' => 'active']
        );
        $this->buildItem(count($this->stack), $active);
    }
676719
public function setActiveSite($siteID) {
		if($this->owner->config()->use_active_site_session) {
			Multisites::inst()->setActiveSite($siteID);
		} else {
			$this->owner->getRequest()->getSession()->set($this->getActiveSiteSessionKey(), $siteID);
		}
	}
155451
public function activate($id)
    {
        $user = $this->findById($id);

        try
        {
            if ( $user->attemptActivation($user->getActivationCode()) )
            {
                $this->event->fire('users.activate',array($user));
                return true;
            }
        }
        catch (UserAlreadyActivatedException $e){}


        return false;
    }
305994
public function setCurrentPageID($id)
    {
        $this->pageID = $id;
        $id = (int)$id;
        /** @deprecated */
        $this->getRequest()->getSession()->set($this->sessionNamespace() . ".currentPage", $id);
    }
1097721
public function activate($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        $data = [];
        $data['id'] = $id;
        $data['status'] = 'active';
        return $this->update($data);
    }
940105
public function update($id, $data)
    {
        $webhook = $this->client->put(
            sprintf('buckets/%d/webhooks/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );
        $webhook = new Webhook($this->response($webhook));
        $webhook->inContext($this->bucket);

        return $webhook;
    }
522747
final public function isActive($active = null)
    {
        if (isset($active)) {
            $this->active = (bool) $active;
            return $this;
        }
        else {
            return $this->active;
        }
    }