Set token status.

@param int $id Token id
@param int $status Token status
@return bool|\Cake\ORM\Entity
506282
public function setStatus($id, $status)
    {
        if (!is_numeric($status)) {
            throw new Exception('Status argument must be an integer');
        }

        $entity = $this->findById($id)->firstOrFail();
        $entity->status = $status;
        $this->save($entity);

        return $entity;
    }
755821
public function usersStatus($id, $status)
    {
        $statuses = ["free", "busy", "dinner", "break"];

        if (empty($status) || !in_array($status, $statuses)) {
            throw new \InvalidArgumentException(
                'Parameter `status` must be not empty & must be equal one of these values: free|busy|dinner|break'
            );
        }

        /** @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            "/users/$id/status",
            "POST",
            ['status' => $status]
        );
    }
1033612
public function setStatus($contentId, $version, $status)
    {
        $q = $this->dbHandler->createUpdateQuery();
        $q->update(
            $this->dbHandler->quoteTable('ezcontentobject_version')
        )->set(
            $this->dbHandler->quoteColumn('status'),
            $q->bindValue($status, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('modified'),
            $q->bindValue(time(), null, \PDO::PARAM_INT)
        )->where(
            $q->expr->lAnd(
                $q->expr->eq(
                    $this->dbHandler->quoteColumn('contentobject_id'),
                    $q->bindValue($contentId, null, \PDO::PARAM_INT)
                ),
                $q->expr->eq(
                    $this->dbHandler->quoteColumn('version'),
                    $q->bindValue($version, null, \PDO::PARAM_INT)
                )
            )
        );
        $statement = $q->prepare();
        $statement->execute();

        if ((bool)$statement->rowCount() === false) {
            return false;
        }

        if ($status !== APIVersionInfo::STATUS_PUBLISHED) {
            return true;
        }

        // If the version's status is PUBLISHED, we set the content to published status as well
        $q = $this->dbHandler->createUpdateQuery();
        $q->update(
            $this->dbHandler->quoteTable('ezcontentobject')
        )->set(
            $this->dbHandler->quoteColumn('status'),
            $q->bindValue(ContentInfo::STATUS_PUBLISHED, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('current_version'),
            $q->bindValue($version, null, \PDO::PARAM_INT)
        )->where(
            $q->expr->eq(
                $this->dbHandler->quoteColumn('id'),
                $q->bindValue($contentId, null, \PDO::PARAM_INT)
            )
        );
        $statement = $q->prepare();
        $statement->execute();

        return (bool)$statement->rowCount();
    }
384093
public function setStatus($status)
    {

        $node = $this->getStatus(false);
        if(!$node){
            $node = $this->createElement('status');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($status);

    }
125232
public function changeStatus($slug, $id, $status)
    {
        $current_model = $this->module->getModel($slug);

        if($current_model = $current_model::findOne($id)){
            $current_model->status = $status;
            $current_model->update();
        }else{
            $this->error = Yii::t('easyii', 'Not found');
        }

        return $this->formatResponse(Yii::t('easyii', 'Status successfully changed'));
    }
1272246
function setStatus( $status )
    {
        if ( $status instanceof eZOrderStatus )
            $this->StatusID = $status->attribute( 'id' );
        else
            $this->StatusID = $status;
        $this->setStatusModified( time() );
    }
270699
public function setStatus($status)
    {
        $validStatus = [
            100,
            101,
            102,
            200,
            201,
            202,
            203,
            204,
            205,
            206,
            207,
            208,
            300,
            301,
            302,
            303,
            304,
            305,
            306,
            307,
            400,
            401,
            402,
            403,
            404,
            405,
            406,
            407,
            408,
            409,
            410,
            411,
            412,
            413,
            414,
            415,
            416,
            417,
            418,
            422,
            423,
            424,
            425,
            426,
            428,
            429,
            431,
            500,
            501,
            502,
            503,
            504,
            505,
            506,
            507,
            508,
            511,
        ];

        if (false === in_array($status, $validStatus, false)) {
            throw new \InvalidArgumentException(sprintf(
                'Provided status does not match a valid HTTP Status Code.',
                $status
            ));
        }
        $this->status = (int) $status;
    }
1060178
public function setStatus($status)
    {
        if (!in_array($status, [self::STATUS_DRAFT, self::STATUS_PUBLISHED, self::STATUS_REVIEW, self::STATUS_OFFLINE])) {
            throw new \InvalidArgumentException('Invalid status');
        }
        $this->status = $status;

        return $this;
    }
52188
public function setNearByPoiShowStatus($poi_id, $status)
    {
        $url = "https://api.weixin.qq.com/wxa/setnearbypoishowstatus?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->callPostApi($url, ['poi_id' => $poi_id, 'status' => $status], true);
    }
739294
public function setStatus($status)
    {
        if (!in_array($status, array(
            self::STATUS_ACTIVE,
            self::STATUS_INACTIVE,
        ))) {
            throw new \InvalidArgumentException("Invalid status in ".get_class($this).".");
        }

        $this->status = $status;

        return $this;
    }
845956
public function setStatus($status)
    {
        if (!in_array($status, static::$allowedStatuses))
        {
            throw new RuntimeException("Unknown transaction status given: {$status}");
        }

        $this->status = $status;

        return $this;
    }
1110450
public function setStatus(\Flowcode\ShopBundle\Entity\ProductOrderStatus $status = null)
    {
        $this->status = $status;

        return $this;
    }
1091019
public function setStatusCode(int $statusCode, string $statusText = null)
    {
        $this->statusCode = $statusCode;

        if ($statusText === null && isset(ResponseHeaders::$statusTexts[$statusCode])) {
            $this->statusText = ResponseHeaders::$statusTexts[$statusCode];
        } else {
            $this->statusText = $statusText;
        }
    }
1210027
public function notice(string $id, string $message, int $status = 400)
    {
        Log::info($id . ' : ' . $message);

        return response ()->json (['success' => false, 'id' => $id, 'message' => $message], $status);
    }
1212922
public function setStatus($status)
    {
        if ($status && $this->enabled->get()) {
            try {
                $this->lastUpdate = time();
                $this->openSession($this->serverLogin->get(), $this->apikey->get());
            } catch (\Exception $e) {
                echo $e->getMessage();
            }
        }
    }
933903
public function setStatus($status) {

        $this->checkInArray($status, GDAXConstants::$fundingStatusValues);
        $this->status = $status;
        return $this;

    }
548786
public function setStatus($status) {
        if($this->setModified('status', $status)->isModified()) {
            $this->status = $status;
        }

        return $this;
    }