protected function removeRenderable(RenderableInterface $renderableToRemove)
    {
        if ($renderableToRemove->getParentRenderable() !== $this) {
            throw new FormDefinitionConsistencyException('The renderable to be removed must be part of the calling parent renderable.', 1326090127);
        }

        $updatedRenderables = [];
        foreach ($this->renderables as $renderable) {
            if ($renderable === $renderableToRemove) {
                continue;
            }

            $updatedRenderables[] = $renderable;
        }
        $this->renderables = $updatedRenderables;

        $renderableToRemove->onRemoveFromParentRenderable();
    }
protected function removeRenderable(RenderableInterface $renderableToRemove)
    {
        if ($renderableToRemove->getParentRenderable() !== $this) {
            throw new FormDefinitionConsistencyException('The renderable to be removed must be part of the calling parent renderable.', 1326090127);
        }

        $updatedRenderables = [];
        foreach ($this->renderables as $renderable) {
            if ($renderable === $renderableToRemove) {
                continue;
            }

            $updatedRenderables[] = $renderable;
        }
        $this->renderables = $updatedRenderables;

        $renderableToRemove->onRemoveFromParentRenderable();
    }
protected function removeRenderable ( RenderableInterface $ renderableToRemove ) { if ( $ renderableToRemove -> getParentRenderable ( ) !== $ this ) { throw new FormDefinitionConsistencyException ( 'The renderable to be removed must be part of the calling parent renderable.' , 1326090127 ) ; } $ updatedRenderables = [ ] ; foreach ( $ this -> renderables as $ renderable ) { if ( $ renderable === $ renderableToRemove ) { continue ; } $ updatedRenderables [ ] = $ renderable ; } $ this -> renderables = $ updatedRenderables ; $ renderableToRemove -> onRemoveFromParentRenderable ( ) ; }
Remove a renderable from this renderable.

This function will be wrapped by the subclasses, f.e. with an "removePage"
or "removeElement" method with the correct type hint.

@param RenderableInterface $renderableToRemove
@return void
@throws FormDefinitionConsistencyException
@internal
Remove a renderable from this renderable .