PhpOffice\PhpPresentation\Writer\PowerPoint2007\CommentAuthors::render PHP Method

render() public method

public render ( ) : PhpOffice\Common\Adapter\Zip\ZipInterface
return PhpOffice\Common\Adapter\Zip\ZipInterface
    public function render()
    {
        /**
         * @var Author[]
         */
        $arrayAuthors = array();
        foreach ($this->getPresentation()->getAllSlides() as $oSlide) {
            foreach ($oSlide->getShapeCollection() as $oShape) {
                if (!$oShape instanceof Comment) {
                    continue;
                }
                $oAuthor = $oShape->getAuthor();
                if (!$oAuthor instanceof Author) {
                    continue;
                }
                if (array_key_exists($oAuthor->getHashCode(), $arrayAuthors)) {
                    continue;
                }
                $arrayAuthors[$oAuthor->getHashCode()] = $oAuthor;
            }
        }
        if (!empty($arrayAuthors)) {
            $this->getZip()->addFromString('ppt/commentAuthors.xml', $this->writeCommentsAuthors($arrayAuthors));
        }
        return $this->getZip();
    }