You are here

public function PHPExcel_Writer_Excel2007_Drawing::allDrawings in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php \PHPExcel_Writer_Excel2007_Drawing::allDrawings()

* Get an array of all drawings * *

Parameters

PHPExcel $pPHPExcel: * @return PHPExcel_Worksheet_Drawing[] All drawings in PHPExcel * @throws PHPExcel_Writer_Exception

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php, line 579

Class

PHPExcel_Writer_Excel2007_Drawing
PHPExcel_Writer_Excel2007_Drawing

Code

public function allDrawings(PHPExcel $pPHPExcel = null) {

  // Get an array of all drawings
  $aDrawings = array();

  // Loop through PHPExcel
  $sheetCount = $pPHPExcel
    ->getSheetCount();
  for ($i = 0; $i < $sheetCount; ++$i) {

    // Loop through images and add to array
    $iterator = $pPHPExcel
      ->getSheet($i)
      ->getDrawingCollection()
      ->getIterator();
    while ($iterator
      ->valid()) {
      $aDrawings[] = $iterator
        ->current();
      $iterator
        ->next();
    }
  }
  return $aDrawings;
}