Sets the application

@param ApplicationInterface $application
@param string|null $status
@return $this
557517
public function setApplication(ApplicationInterface $application, $status = null)
    {
        $this->application = $application;
        $this->setTo(
            $application->getJob()->getUser()->getInfo()->getEmail(),
            $application->getJob()->getUser()->getInfo()->getDisplayName(false)
        );
        $this->setVariablesFromApplication($application);
        return $this;
    }
313231
public function setStatus(\Sulu\Bundle\Sales\ShippingBundle\Entity\ShippingStatus $status)
    {
        $this->status = $status;
    
        return $this;
    }
664165
public function setStatus($status) {

        if ( !in_array($status, range(0, 3)) ) throw new InvalidArgumentException("Invalid status $status");

        $this->status = $status;

        return $this;

    }
1292407
public function setStatus($status)
    {
        if (!in_array($status, [static::STATUS_STARTED, static::STATUS_STOPPED], true)) {
            throw new InvalidArgumentException('Invalid status value.');
        }

        $this->status = $status;

        return $this;
    }
238753
public function updateResponse(ApplicationInterface $application, RequestInterface $request, ResponseInterface $response): void
    {
        parent::updateResponse($application, $request, $response);

        $locationUrl = Url::parseRelative($this->location, $request->getUrl());
        $response->setHeader('Location', $locationUrl->__toString());
    }
548786
public function setStatus($status) {
        if($this->setModified('status', $status)->isModified()) {
            $this->status = $status;
        }

        return $this;
    }
719578
public function setStatusUser($status)
    {
        $options = $id = $result = null;

        if ($this->getParam('all')) {
            $options = array();
        } else {

            $id = $this->getParam(0);

            if (!is_numeric($id)) { // Allow 0 for roleless users
                $this->errorAndExit($this->text('Invalid argument'));
            }

            if ($this->getParam('role')) {
                $options = array('role_id' => $id);
            } else if ($this->getParam('store')) {
                $options = array('store_id' => $id);
            }
        }

        if (isset($options)) {

            $updated = $count = 0;
            foreach ($this->user->getList($options) as $item) {
                $count++;
                $updated += (int) $this->user->update($item['user_id'], array('status' => (bool) $status));
            }

            $result = $count && $count == $updated;

        } else if (isset($id)) {
            $result = $this->user->update($id, array('status' => (bool) $status));
        }

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
900783
public function set_status($status = self::STATUS_ACTIVE) {
        $this->statusactive = $status == static::STATUS_ACTIVE;
        $this->statussuspended = $status == static::STATUS_SUSPENDED;
        $this->statusnotcurrent = $status == static::STATUS_NOT_CURRENT;

        return $this;
    }
1049336
public function setStatus($status)
    {
        if (!in_array($status, static::getAvailableStatuses(), true)) {
            throw new InvalidArgumentException(sprintf('Status not recognized ; Had "%s", expected one of "%s"', $status, implode('", "', static::getAvailableStatuses())));
        }

        $this->status = $status;

        return $this;
    }
341644
public function boot(Application $application, InputInterface $input, $output)
    {
        if (true === $this->booted) {
            return;
        }

        $this->application = $application;
        $this->input       = $input;
        $this->output      = $output;

        $this->initializeContainer();
        $this->booted = true;
    }
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;
    }
146469
public function newFromApplication(ApplicationInterface $application)
    {
        // create a new AppNode and initialize it
        $appNode = new AppNode();
        $appNode->initFromApplication($application);
        $appNode->setParentUuid($this->getSystemConfiguration()->getUuid());

        // persist the AppNode instance
        $this->persist($appNode);
    }
949657
public function setDirectories(BBApplication $application = null)
    {
        if (null !== $application) {
            $this->_application = $application;

            $this->setTemporaryDir($application->getTemporaryDir())
                    ->setStorageDir($application->getStorageDir())
                    ->setMediaDir($application->getMediaDir());
        }

        return $this;
    }
91146
public function setStatus($status)
    {
        if (!in_array($status, $this->getStatusses())) {
            throw new Exception(sprintf('Illegal status %1$s given. Must be one of %2$s', $status, implode(', ', $this->getStatusses())));
        }

        $this->status = $status;

        return $this;
    }
842295
public function setStatus(\Sulu\Bundle\ProductBundle\Entity\Status $status)
    {
        $this->status = $status;

        return $this;
    }
587001
public function setApplication(ApiApplication $application)
    {
        $application->addAccount($this);

        $this->application = $application;

        return $this;
    }
1319416
public function setIssueStatus($id, $status)
    {
        $api = $this->client->issue_status;
        $statusId = $api->getIdByName($status);

        return $this->update($id, [
            'status_id' => $statusId,
        ]);
    }