Augments (@link Hierarchy::stageChildren()}

@param $staged DataList
@param $showAll boolean
181993
public function stageChildren($showAll = false) {
		$staged = parent::stageChildren($showAll);

		if($this->shouldFilter()) {
			// Filter the SiteTree
			return $staged->exclude("ClassName", $this->owner->getExcludedSiteTreeClassNames());
		}
		return $staged;
	}
340215
protected function createStages()
    {
        // Get stages
        $availableStages = $this->connections->getAvailableStages();
        $originalStage = $this->connections->getCurrentConnectionKey()->stage;
        if (empty($availableStages)) {
            $availableStages = [null];
        }

        // Create folders
        $mapping = $this->config->get('remote.directories');
        foreach ($availableStages as $stage) {
            $this->connections->setStage($stage);
            $this->createFolder($mapping['releases']);
            $this->createFolder($mapping['current']);
            $this->createFolder($mapping['shared']);
        }

        if ($originalStage) {
            $this->connections->setStage($originalStage);
        }
    }
370865
protected function augmentSQLStage(SQLSelect $query, DataQuery $dataQuery)
    {
        if (!$this->hasStages()) {
            return;
        }
        $stage = $dataQuery->getQueryParam('Versioned.stage');
        ReadingMode::validateStage($stage);
        if ($stage === static::DRAFT) {
            return;
        }
        // Rewrite all tables to select from the live version
        foreach ($query->getFrom() as $table => $dummy) {
            if (!$this->isTableVersioned($table)) {
                continue;
            }
            $stageTable = $this->stageTable($table, $stage);
            $query->renameTable($table, $stageTable);
        }
    }
816872
public function then($formStage, array $fieldNamesDefinedInStage = []) : StagedForm
    {
        $this->followingStages[] = self::parseStage($formStage, null, $fieldNamesDefinedInStage);

        return $this;
    }
818466
public function loadEverything($showTests = false)
    {
        $this->showProgress('Config loaded from '.Config::getConfigPath());

        $this->loadTesters();

        $this->loadProjects();

        $this->loadTests($showTests);
    }
427842
public void showMenu (Stage stage, float x, float y) {
		setPosition(x, y - getHeight());
		if (stage.getHeight() - getY() > stage.getHeight()) setY(getY() + getHeight());
		ActorUtils.keepWithinStage(stage, this);
		stage.addActor(this);
	}
1075195
function (target) {
            var dom = this.callBase(null);

            if (this.$externalInterface) {
                this.$externalInterface._stageRendered(dom);
            }

            if (target) {
                target.appendChild(dom);
                this.rendered = true;
                this.$bus.trigger('Stage.Rendered', target);
                this.trigger('dom:add', target);
            }
            return dom;
        }
445358
public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {
		$staged = parent::liveChildren($showAll, $onlyDeletedFromStage);

		if($this->shouldFilter()) {
			// Filter the SiteTree
			return $staged->exclude("ClassName", $this->owner->getExcludedSiteTreeClassNames());
		}
	}
69737
public void showView(Modality modality) {
        if (! isPrimaryStageView && (stage == null || currentStageModality != modality)) {
            stage = createStage(modality);
        }
        stage.show();
    }
1336078
public function AllHistoricalChildren()
    {
        /** @var DataObject|Versioned|Hierarchy $owner */
        $owner = $this->owner;
        if (!$owner->hasExtension(Versioned::class) || !$owner->hasStages()) {
            throw new Exception(
                'Hierarchy->AllHistoricalChildren() only works with Versioned extension applied with staging'
            );
        }

        $baseTable = $owner->baseTable();
        $parentIDColumn = $owner->getSchema()->sqlColumnForField($owner, 'ParentID');
        return Versioned::get_including_deleted(
            $owner->baseClass(),
            [ $parentIDColumn => $owner->ID ],
            "\"{$baseTable}\".\"ID\" ASC"
        );
    }
1305323
public function stages($stages)
    {
        if (is_array($stages)) {
            $implode = implode(',', $stages);
            $this->option('-S', $implode);
        } else {
            $this->option('-S', $stages);
        }

        return $this;
    }
783462
private function assertThereIsAtMostOneConnectorPerStage($stageName, $stageConnectors)
    {
        if (count($stageConnectors) > 1) {
            $connectorClasses = [];
            foreach ($stageConnectors as $connector) {
                $connectorClasses[] = $connector->getStepFqcn();
            }
            $connectors = implode(',', $connectorClasses);

            throw new PipelineBuildingException(
                "Multiple stage connectors found for stage '$stageName'. Please remove one of: $connectors."
            );
        }
    }
539795
function () {
            var self = this;
            self.set('expanded', true);
            util.each(self.get('children'), function (c) {
                c.expandAll();
            });
        }
23505
public function setChildren(array $children, $compoundLevel = null)
    {
        // TODO: Try to refactor this logic
        $compoundLevel = $compoundLevel ?? $this->getCompoundLevel($children);
        $immediateChildren = [];
        $grandchildren = [];
        $newContentType = $this->userContentType;

        foreach ($children as $child) {
            $level = $this->getNeededChildLevel($child, $compoundLevel);
            if (empty($immediateChildren)) {
                //first iteration
                $immediateChildren = [$child];
            } else {
                $nextLevel = $this->getNeededChildLevel($immediateChildren[0], $compoundLevel);
                if ($nextLevel == $level) {
                    $immediateChildren[] = $child;
                } elseif ($level < $nextLevel) {
                    // Re-assign immediateChildren to grandchildren
                    $grandchildren = array_merge($grandchildren, $immediateChildren);
                    // Set new children
                    $immediateChildren = [$child];
                } else {
                    $grandchildren[] = $child;
                }
            }
        }

        if ($immediateChildren) {
            $lowestLevel = $this->getNeededChildLevel($immediateChildren[0], $compoundLevel);

            // Determine which composite media type is needed to accommodate the
            // immediate children
            foreach ($this->compositeRanges as $mediaType => $range) {
                if ($lowestLevel > $range[0] && $lowestLevel <= $range[1]) {
                    $newContentType = $mediaType;

                    break;
                }
            }

            // Put any grandchildren in a subpart
            if (!empty($grandchildren)) {
                $subentity = $this->createChild();
                $subentity->setNestingLevel($lowestLevel);
                $subentity->setChildren($grandchildren, $compoundLevel);
                array_unshift($immediateChildren, $subentity);
            }
        }

        $this->immediateChildren = $immediateChildren;
        $this->children = $children;
        $this->setContentTypeInHeaders($newContentType);
        $this->fixHeaders();
        $this->sortChildren();

        return $this;
    }
47948
protected function getVariables($showAll)
    {
        $scopeVars = $this->context->getAll();
        \uksort($scopeVars, function ($a, $b) {
            $aIndex = \array_search($a, self::$specialNames);
            $bIndex = \array_search($b, self::$specialNames);

            if ($aIndex !== false) {
                if ($bIndex !== false) {
                    return $aIndex - $bIndex;
                }

                return 1;
            }

            if ($bIndex !== false) {
                return -1;
            }

            return \strnatcasecmp($a, $b);
        });

        $ret = [];
        foreach ($scopeVars as $name => $val) {
            if (!$showAll && \in_array($name, self::$specialNames)) {
                continue;
            }

            $ret[$name] = $val;
        }

        return $ret;
    }
552195
Stage<Void> doCollectAndDiscard(
      Collection<? extends Stage<?>> stages
  ) {
    final Completable<Void> target = completable();

    final CollectAndDiscardHelper done = new CollectAndDiscardHelper(stages.size(), target);

    for (final Stage<?> q : stages) {
      q.handle(done);
    }

    bindSignals(target, stages);
    return target;
  }
929857
public static void addActors(final Stage stage, final Iterable<Actor> actors) {
        if (actors != null) {
            for (final Actor actor : actors) {
                stage.addActor(actor);
            }
        }
    }