Exclude object from result

@param   ChildStructureNode $structureNode Object to remove from the list of results

@return $this|ChildStructureNodeQuery The current query, for fluid interface
350413
public function prune($structureNode = null)
    {
        if ($structureNode) {
            $this->addUsingAlias(StructureNodeTableMap::COL_ID, $structureNode->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
94341
private function iterateStructure(ClassMap $classMap, ElementtypeStructure $structure, ElementtypeStructureNode $node)
    {
        $fieldRegistry = $this->getContainer()->get('phlexible_elementtype.field.registry');
        $data = [];

        foreach ($structure->getChildNodes($node->getDsId()) as $childNode) {
            $field = $fieldRegistry->getField($childNode->getType());
            if ($field->isField()) {
                $data[$childNode->getName()] = $childNode->getType();
            } else {
                if ($childNode->isOptional() || $childNode->isRepeatable()) {
                    $data[$childNode->getName()] = $this->toCamelCase($childNode->getName()).'[]';
                    $map = $this->iterateStructure($classMap, $structure, $childNode);
                    $classMap->add($this->toCamelCase($childNode->getName()), $map);
                } else {
                    $data = array_merge($data, $this->iterateStructure($classMap, $structure, $childNode));
                }
            }
        }

        return $data;
    }
29280
public function isStructureNode($refName)
    {
        return $this->getValue(
            $refName,
            'structure_node',
            function ($page) {
                /* @noinspection PhpDeprecationInspection */
                return $page instanceof HasNodeInterface && $page->isStructureNode();
            }
        );
    }
496885
public function filterStructuredVariables(array $structure, array $filter)
    {
        $all = [
            \taoResultServer_models_classes_ResponseVariable::class,
            \taoResultServer_models_classes_OutcomeVariable::class,
            \taoResultServer_models_classes_TraceVariable::class
        ];
        $toRemove = array_diff($all, $filter);
        $filtered = $structure;
        foreach ($filtered as $timestamp => $entry) {
            foreach ($entry as $key => $value) {
                if (in_array($key, $toRemove)) {
                    unset($filtered[$timestamp][$key]);
                }
            }
        }
        return $filtered;
    }
125116
private static function removeProceedingNodes($domNode, $topNode)
    {
        $nextNode = $domNode->nextSibling;

        if ($nextNode !== null) {
            self::removeProceedingNodes($nextNode, $topNode);
            $domNode->parentNode->removeChild($nextNode);
        } else {
            //scan upwards till we find a sibling
            $curNode = $domNode->parentNode;
            while ($curNode !== $topNode) {
                if ($curNode->nextSibling !== null) {
                    $curNode = $curNode->nextSibling;
                    self::removeProceedingNodes($curNode, $topNode);
                    $curNode->parentNode->removeChild($curNode);
                    break;
                }
                $curNode = $curNode->parentNode;
            }
        }
    }
14667
private function manyToMany(&$structure, $property, $relation)
    {
        $from = $structure->name;
        $to = $relation->targetEntity;

        $reflection = null;
        try {
            $reflection = new \ReflectionClass($to);
        }catch(\Exception $e) { // @codeCoverageIgnore
            // Ignore, we will throw error on the next if. // @codeCoverageIgnore
        }
        if ($reflection === null || ! $reflection->isSubclassOf(Entity::class)) {
            throw new RelationException("The target entity of your relation on the entity '".$from."' and property '".$property->getName()."' has an unknown target Entity!"); // @codeCoverageIgnore
        }

        /** @var JoinTable $join */
        $join = $this->getJoin($property, JoinTable::class);
        $join->sourceEntityName = $from;
        $join->targetEntityName = $to;

        $relation->join = $join;

        // Register the join table
        EntityManager::getInstance()->registerJoinTable($join);

        // Add declaration to the structure
        $structure->relationProperties[] = $property->getName();
        $structure->foreignColumnNames[] = $join->column;
        $structure->relations[$property->getName()] = $relation;
    }
1304357
public function hydrate( array $data, $structure )
    {
        if ( $structure instanceof Structure )
        {
            $structure->setOptions( $data );
        }
        else
        {
            foreach ( $data as $key => $value )
            {
                $structure->$key = $value;
            }
        }

        if ( $structure instanceof MapperAwareInterface )
        {
            $structure->setMapper( $this );
        }

        return $structure;
    }
733493
public function mode($mode)
    {
        if (!isset($this->templates[$mode])) {
            throw new Exception(['Structure builder does not have this mode', 'mode' => $mode]);
        }

        $this->mode = $mode;
        $this->template = $this->templates[$mode];

        return $this;
    }
690303
public static function buildStructure($array, Structure $structure)
    {
        switch ($structure->getType()) {
            case Structure::TYPE_LIST:
                $result = self::buildList($array, $structure);
                break;
            case Structure::TYPE_ARRAY:
                $result = self::buildArray($array, $structure);
                break;
            default:
                throw new Exception('Unknown structure type ' . $structure->getType());
        }

        return $result;
    }
710132
public function prune($structureNodeParent = null)
    {
        if ($structureNodeParent) {
            $this->addCond('pruneCond0', $this->getAliasedColName(StructureNodeParentTableMap::COL_STRUCTURE_NODE_ID), $structureNodeParent->getStructureNodeId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(StructureNodeParentTableMap::COL_PARENT_ID), $structureNodeParent->getParentId(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
1246321
public function remove($selector=null)
    {
        $result = $this;
        if ($selector) {
            $result = $result->filter($selector);
        }
        foreach ($result->nodes as $node) {
            if ($node->parentNode) {
                $node->parentNode->removeChild($node);
            }
        }

        $result->nodes = array();
        $result->length = 0;

        return $result;
    }
772955
public function dontSeeSoapResponseContainsStructure($xml)
    {
        $xml = SoapUtils::toXml($xml);
        $this->debugSection("Structure", $xml->saveXML());
        $this->assertFalse((bool)$this->getXmlStructure()->matchXmlStructure($xml), "this structure is in response");
    }
1110800
public function addMoved(ElementtypeStructureNode $oldNode, ElementtypeStructureNode $newNode)
    {
        $this->moved[] = ['oldNode' => $oldNode, 'newNode' => $newNode];

        return $this;
    }
554863
protected function removeChild(Node $child) {
    $this->childCount--;
    foreach ($this->getChildProperties() as $name => $value) {
      if ($child === $value) {
        $this->{$name} = NULL;
        break;
      }
    }
    if ($child->previous === NULL) {
      $this->head = $child->next;
    }
    else {
      $child->previous->next = $child->next;
    }
    if ($child->next === NULL) {
      $this->tail = $child->previous;
    }
    else {
      $child->next->previous = $child->previous;
    }
    $child->parent = NULL;
    $child->previous = NULL;
    $child->next = NULL;
    return $this;
  }
247726
public function clear()
    {
        if (null !== $this->aStructureNodeRelatedByStructureNodeId) {
            $this->aStructureNodeRelatedByStructureNodeId->removeStructureNodeParentRelatedByStructureNodeId($this);
        }
        if (null !== $this->aStructureNodeRelatedByParentId) {
            $this->aStructureNodeRelatedByParentId->removeStructureNodeParentRelatedByParentId($this);
        }
        $this->structure_node_id = null;
        $this->parent_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1237933
function removeChild(node) {
    if (tree.Logical.getParentNode(node) !== this) {
      throw Error('The node to be removed is not a child of this node: ' +
        node);
    }
    if (!mixinImpl.removeNode(node)) {
      // if removing from a shadyRoot, remove form host instead
      var container = isShadyRoot(this) ?
        this.host :
        this;
      // not guaranteed to physically be in container; e.g.
      // undistributed nodes.
      var parent = tree.Composed.getParentNode(node);
      if (container === parent) {
        tree.Composed.removeChild(container, node);
      }
    }
    mixinImpl._scheduleObserver(this, null, node);
    return node;
  }
258310
private function getProxies($contentData, StructureInterface $structure)
    {
        $contentData = $contentData ?: '{}';
        $data = json_decode($contentData, true);

        $content = $this->contentProxyFactory->createContentProxy($structure, $data);
        $view = $this->contentProxyFactory->createViewProxy($structure, $data);

        return [$content, $view];
    }