PhpOffice\PhpPresentation\Shape\Chart::getIndexedFilename PHP Метод

getIndexedFilename() публичный Метод

Get indexed filename (using image index)
public getIndexedFilename ( ) : string
Результат string
    public function getIndexedFilename()
    {
        return 'chart' . $this->getImageIndex() . '.xml';
    }

Usage Example

Пример #1
0
 /**
  * Write chart relationships to XML format
  *
  * @param  \PhpOffice\PhpPresentation\Shape\Chart $pChart
  * @return string                    XML Output
  * @throws \Exception
  */
 public function writeChartRelationships(ShapeChart $pChart)
 {
     // Create XML writer
     $objWriter = $this->getXMLWriter();
     // 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();
 }