PhpOffice\PhpPresentation\Reader\ODPresentation::loadSlide PHP Method

loadSlide() protected method

Read Slide
protected loadSlide ( DOMElement $nodeSlide )
$nodeSlide DOMElement
    protected function loadSlide(\DOMElement $nodeSlide)
    {
        // Core
        $this->oPhpPresentation->createSlide();
        $this->oPhpPresentation->setActiveSlideIndex($this->oPhpPresentation->getSlideCount() - 1);
        if ($nodeSlide->hasAttribute('draw:name')) {
            $this->oPhpPresentation->getActiveSlide()->setName($nodeSlide->getAttribute('draw:name'));
        }
        if ($nodeSlide->hasAttribute('draw:style-name')) {
            $keyStyle = $nodeSlide->getAttribute('draw:style-name');
            if (isset($this->arrayStyles[$keyStyle])) {
                $this->oPhpPresentation->getActiveSlide()->setBackground($this->arrayStyles[$keyStyle]['background']);
            }
        }
        foreach ($this->oXMLReader->getElements('draw:frame', $nodeSlide) as $oNodeFrame) {
            if ($this->oXMLReader->getElement('draw:image', $oNodeFrame)) {
                $this->loadShapeDrawing($oNodeFrame);
                continue;
            }
            if ($this->oXMLReader->getElement('draw:text-box', $oNodeFrame)) {
                $this->loadShapeRichText($oNodeFrame);
                continue;
            }
        }
        return true;
    }