@param $status

@return \Doctrine\Common\Collections\ArrayCollection
555251
public function getChildrenByStatus($status)
    {
        $children = new ArrayCollection();
        foreach ($this->getChildren() as $child) {
            if ($status === Page::STATUS_PUBLISHED) {
                if ($child->getPage() && !$child->getPage()->getSnapshot()) {
                    continue;
                }
            }
            $children->add($child);
        }

        return $children;
    }
755266
public function status($status = null)
    {
        if (is_null($status)) {
            unset($this->filters['post_status']);
        } else {
            $this->filters['post_status'] = $status;
        }

        return $this;
    }
1065508
public function setStatus($status)
    {
        if (!empty($status) && ctype_print($status)) {
            $this->status = trim($status);
        }

        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;
    }
1271925
public function transform($status, array $params = array())
    {
        if (!$status instanceof StatusInterface) {
            throw new TransformerParameterTypeException();
        }

        $facade = $this->newFacade();

        $facade->publishedState = $status->isPublishedState();
        $facade->initialState = $status->isInitialState();
        $facade->blockedEdtion = $status->isBlockedEdition();
        $facade->autoPublishFromState = $status->isAutoPublishFromState();
        $facade->autoUnpublishToState = $status->isAutoUnpublishToState();
        $facade->translationState = $status->isTranslationState();
        $facade->name = $status->getName();
        $facade->label = $this->multiLanguagesChoiceManager->choose($status->getLabels());
        $facade->displayColor = $this->translator->trans('open_orchestra_workflow_admin.form.status.color.' . $status->getDisplayColor());
        $facade->codeColor = $status->getDisplayColor();
        $facade->id = $status->getId();

        if ($this->hasGroup(CMSGroupContext::AUTHORIZATIONS)) {
            $canDelete = $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $status)
                && !$this->usageFinder->hasUsage($status)
                && !$status->isInitialState()
                && !$status->isPublishedState()
                && !$status->isTranslationState()
                && !$status->isAutoPublishFromState()
                && !$status->isAutoUnpublishToState();

            $facade->addRight('can_delete', $canDelete);
        }

        return $facade;
    }
153025
public static function get($params = array())
	{
		$object = new static;
		$data   = $object->request('GET', $object->getUrl(), $params);
		$data   = $object->stripResponseData($data);

		// Initialise a collection
		$collection = self::newCollection();

		if (isset($data[0]) && is_array($data[0])) {
			// This should be a collection
			$collection->setItems($data);
		}

		return $collection;
	}
42283
public function union($items): ArrayCollection
    {
        return new static(array_unique(array_merge($this->items, $this->itemsArray($items))));
    }
1282795
protected function filterStatus($status)
    {
        if (!is_integer($status) ||
            $status<StatusCode::HTTP_CONTINUE ||
            $status>StatusCode::HTTP_NETWORK_CONNECTION_TIMEOUT_ERROR
        ) {
            throw new InvalidArgumentException('Invalid HTTP status code');
        }

        return $status;
    }
796268
public function isStatic($status = null)
    {
        $this->is_static = $status !== null ? $status : $this->is_static;
        return $this->is_static ;
    }
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;
    }
989729
protected function buildPortStatusRows(array $status)
    {
        $rows = [];

        foreach ($status['ports'] as $port => $value) {
            $row = [
                $port,
                $value['status'],
            ];

            $rows[] = $row;
        }
        $warnings = $status['state']['warning'];

        $rows[] = new TableSeparator();
        $rows[] = [new TableCell(
            sprintf('There is %d warning(s) on %s!', $warnings, $status['host']),
            ['colspan' => 2]
        )];

        return $rows;
    }
754736
public function withStatus($status)
    {
        if (is_int($status) && $status >= 100 && $status < 600) {
            $this->status = $status;
        } else {
            $this->status = 500;
        }

        return $this;
    }
1050454
public function status($status = null)
    {
        if ($status === null) {
            return $this->subscription_status;
        } else {
            $this->subscription_status = $status;
            return $this;
        }
    }
1211904
public function status($status = null)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->status($status);
        return $this;
    }
1225456
protected function getObjectsIds($keep, $status)
    {
        $query = $this->connection->createQueryBuilder()
                ->select('c.id')
                ->from('ezcontentobject', 'c')
                ->join('c', 'ezcontentobject_version', 'v', 'v.contentobject_id = c.id')
                ->groupBy('c.id', 'v.status')
                ->having('count(c.id) > :keep');
        $query->setParameter('keep', $keep);

        if ($status !== self::VERSION_ALL) {
            $query->where('v.status = :status');
            $query->setParameter('status', $this->mapStatusToVersionInfoStatus($status));
        } else {
            $query->andWhere('v.status != :status');
            $query->setParameter('status', $this->mapStatusToVersionInfoStatus(self::VERSION_PUBLISHED));
        }

        $stmt = $query->execute();

        return $stmt->fetchAll(PDO::FETCH_COLUMN);
    }
198901
public function loop($status = false)
    {
        if($status) {
            $this->attributes['loop'] = true;
        } else {
            unset($this->attributes['loop']);
        }

        return $this;
    }
976578
public function withStatus(string $status): self
    {
        $this->status = JobEventStatusEnum::ensureValid($status);
        return $this;
    }