PhpOffice\PhpPresentation\Writer\PowerPoint2007\PptCharts::writeChartRelationships PHP Method

writeChartRelationships() public method

Write chart relationships to XML format
public writeChartRelationships ( Chart $pChart ) : string
$pChart PhpOffice\PhpPresentation\Shape\Chart
return string XML Output
    public function writeChartRelationships(Chart $pChart)
    {
        // Create XML writer
        $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
        // XML header
        $objWriter->startDocument('1.0', 'UTF-8', 'yes');
        // Relationships
        $objWriter->startElement('Relationships');
        $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');
        // Write spreadsheet relationship?
        if ($pChart->hasIncludedSpreadsheet()) {
            $this->writeRelationship($objWriter, 1, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/package', '../embeddings/' . $pChart->getIndexedFilename() . '.xlsx');
        }
        $objWriter->endElement();
        // Return
        return $objWriter->getData();
    }