Facebook\InstantArticles\Elements\InstantArticle::addChild PHP Method

addChild() public method

Adds new child elements to this InstantArticle
public addChild ( Element $child )
$child Element to be added to this Article.
    public function addChild($child)
    {
        Type::enforce($child, [Ad::getClassName(), Analytics::getClassName(), AnimatedGIF::getClassName(), Audio::getClassName(), Blockquote::getClassName(), Image::getClassName(), H1::getClassName(), H2::getClassName(), Interactive::getClassName(), ListElement::getClassName(), Map::getClassName(), Paragraph::getClassName(), Pullquote::getClassName(), RelatedArticles::getClassName(), Slideshow::getClassName(), SocialEmbed::getClassName(), Video::getClassName()]);
        $this->children[] = $child;
        return $this;
    }