示例#1
0
 /**
  * Render header labels for the CSV output.
  *
  * @param Fields $fields
  * @param CsvCell $csvCell
  * @return array
  */
 protected function renderHeader(Fields $fields, CsvCell $csvCell)
 {
     $header = [];
     foreach ($fields as $field) {
         $header[] = $csvCell->getHeaderRenderer()->render($field);
     }
     return $header;
 }
示例#2
0
 public function testUsage()
 {
     $this->assertInstanceOf('\\Dewdrop\\Fields\\Helper\\CsvCell\\Content', $this->csvCellFieldsHelper->getContentRenderer());
     $this->assertInstanceOf('\\Dewdrop\\Fields\\Helper\\CsvCell\\Header', $this->csvCellFieldsHelper->getHeaderRenderer());
 }