protected function buildLocationTable(School $school)
 {
     // Region
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(6, 3, "Регион:")->mergeCells($this->getPosition(3, 3, 'G') . ":" . $this->getPosition(3, 3, 'H'));
     $this->styleAlignHorizontalRight(3, 3, 'G')->styleBorderThin(3, 3, 'G')->styleFontBold(3, 3, 'G');
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(8, 3, $school->getRegion() ? $school->getRegion()->getName() : '-')->mergeCells($this->getPosition(3, 3, 'I') . ":" . $this->getPosition(3, 3, 'J'));
     $this->styleAlignHorizontalRight(3, 3, 'I')->styleAlignHorizontalRight(3, 3, 'J')->styleBorderThin(3, 3, 'I')->styleBorderThin(3, 3, 'J');
     // Settlement
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(6, 4, "Населенный пункт:")->mergeCells($this->getPosition(4, 4, 'G') . ":" . $this->getPosition(4, 4, 'H'));
     $this->styleAlignHorizontalRight(4, 4, 'G')->styleBorderThin(4, 4, 'G')->styleFontBold(4, 4, 'G');
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(8, 4, $school->getSettlement()->getName() ?: '-')->mergeCells($this->getPosition(4, 4, 'I') . ":" . $this->getPosition(4, 4, 'J'));
     $this->styleAlignHorizontalRight(4, 4, 'I')->styleAlignHorizontalRight(4, 4, 'J')->styleBorderThin(4, 4, 'I')->styleBorderThin(4, 4, 'J');
     // Address
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(6, 5, "Адрес:")->mergeCells($this->getPosition(5, 5, 'G') . ":" . $this->getPosition(5, 5, 'H'));
     $this->styleAlignHorizontalRight(5, 5, 'G')->styleBorderThin(5, 5, 'G')->styleFontBold(5, 5, 'G');
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(8, 5, $school->getAddress() ?: '-')->mergeCells($this->getPosition(5, 5, 'I') . ":" . $this->getPosition(5, 5, 'J'));
     $this->styleAlignHorizontalRight(5, 5, 'I')->styleAlignHorizontalRight(5, 5, 'J')->styleBorderThin(5, 5, 'I')->styleBorderThin(5, 5, 'J');
     // Name
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(6, 6, "Школа:")->mergeCells($this->getPosition(6, 6, 'G') . ":" . $this->getPosition(6, 6, 'H'));
     $this->styleAlignHorizontalRight(6, 6, 'G')->styleBorderThin(6, 6, 'G')->styleFontBold(6, 6, 'G');
     $this->phpExcelObject->getActiveSheet()->setCellValueByColumnAndRow(8, 6, $school->getName() ?: '-')->mergeCells($this->getPosition(6, 6, 'I') . ":" . $this->getPosition(6, 6, 'J'));
     $this->styleAlignHorizontalRight(6, 6, 'I')->styleAlignHorizontalRight(6, 6, 'J')->styleBorderThin(6, 6, 'I')->styleBorderThin(6, 6, 'J');
 }
Beispiel #2
0
 /**
  * Add school
  *
  * @param \AppBundle\Entity\School\School $school
  * @return Settlement
  */
 public function addSchool(\AppBundle\Entity\School\School $school)
 {
     $school->setSettlement($this);
     $this->schools[] = $school;
     return $this;
 }
Beispiel #3
0
 /**
  * Add schools
  *
  * @param \AppBundle\Entity\School\School $school
  * @return Employee
  */
 public function addSchool(\AppBundle\Entity\School\School $school)
 {
     $school->addEmployee($this);
     $this->schools[] = $school;
     return $this;
 }