protected function addRenderable(RenderableInterface $renderable)
    {
        if ($renderable->getParentRenderable() !== null) {
            throw new FormDefinitionConsistencyException(sprintf('The renderable with identifier "%s" is already added to another element (element identifier: "%s").', $renderable->getIdentifier(), $renderable->getParentRenderable()->getIdentifier()), 1325665144);
        }
        $renderable->setIndex(count($this->renderables));
        $renderable->setParentRenderable($this);
        $this->renderables[] = $renderable;
    }
protected function addRenderable(RenderableInterface $renderable)
    {
        if ($renderable->getParentRenderable() !== null) {
            throw new FormDefinitionConsistencyException(sprintf('The renderable with identifier "%s" is already added to another element (element identifier: "%s").', $renderable->getIdentifier(), $renderable->getParentRenderable()->getIdentifier()), 1325665144);
        }
        $renderable->setIndex(count($this->renderables));
        $renderable->setParentRenderable($this);
        $this->renderables[] = $renderable;
    }
protected function addRenderable ( RenderableInterface $ renderable ) { if ( $ renderable -> getParentRenderable ( ) !== null ) { throw new FormDefinitionConsistencyException ( sprintf ( 'The renderable with identifier "%s" is already added to another element (element identifier: "%s").' , $ renderable -> getIdentifier ( ) , $ renderable -> getParentRenderable ( ) -> getIdentifier ( ) ) , 1325665144 ) ; } $ renderable -> setIndex ( count ( $ this -> renderables ) ) ; $ renderable -> setParentRenderable ( $ this ) ; $ this -> renderables [ ] = $ renderable ; }
Add a renderable to the list of child renderables.

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

@param RenderableInterface $renderable
@return void
@throws FormDefinitionConsistencyException
@internal
Add a renderable to the list of child renderables .