Application/Api/Document/Standard/Repository/KamenzReportGym/E11.php
<?php
/**
* Created by PhpStorm.
* User: lehmann
* Date: 27.06.2017
* Time: 10:38
*/
namespace SPHERE\Application\Api\Document\Standard\Repository\KamenzReportGym;
use SPHERE\Application\Document\Generator\Repository\Element;
use SPHERE\Application\Document\Generator\Repository\Section;
use SPHERE\Application\Document\Generator\Repository\Slice;
class E11
{
public static function getContent()
{
$sliceList = array();
$sliceList[] = (new Slice())
->styleTextBold()
->styleMarginTop('20px')
->styleMarginBottom('5px')
->addElement((new Element())
->setContent('E11. Schüler und Profilgruppen im SPRACHLICHEN PROFIL im Schuljahr {{ Content.SchoolYear.Current }} nach Klassenstufen')
);
$sliceList[] = (new Slice())
->styleBackgroundColor('lightgrey')
->styleAlignCenter()
->styleBorderAll()
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Merkmal')
->styleBorderRight()
->stylePaddingTop('17.2px')
->stylePaddingBottom('17.1px'), '40%'
)
->addSliceColumn((new Slice())
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Klassenstufe')
->styleBorderRight()
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('8')
->styleBorderRight(), '33.33%'
)
->addElementColumn((new Element())
->setContent('9')
->styleBorderRight(), '33.33%'
)
->addElementColumn((new Element())
->setContent('10')
->styleBorderRight(), '33.34%'
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '16.66%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '16.67%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '16.66%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '16.67%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '16.67%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '16.67%'
)
), '45%'
)
->addSliceColumn((new Slice())
->styleTextBold()
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Insgesamt')
->stylePaddingTop('8.6px')
->stylePaddingBottom('8.5px')
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '50%'
)
->addElementColumn((new Element())
->setContent('w'), '50%'
)
), '15%'
)
);
for ($i = 0; $i < 5; $i++) {
$section = new Section();
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.E11.S' . $i . '.SubjectName is not empty) %}
{{ Content.E11.S' . $i . '.SubjectName }}
{% else %}
{% endif %}
')
->styleBorderRight()
, '40%'
);
for ($level = 8; $level < 11; $level++) {
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.E11.S' . $i . '.L' . $level . '.m is not empty) %}
{{ Content.E11.S' . $i . '.L' . $level . '.m }}
{% else %}
{% endif %}
')
->styleBorderRight()
, '7.5%'
);
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.E11.S' . $i . '.L' . $level . '.w is not empty) %}
{{ Content.E11.S' . $i . '.L' . $level . '.w }}
{% else %}
{% endif %}
')
->styleBorderRight()
, '7.5%'
);
}
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.E11.S' . $i . '.TotalCount.m is not empty) %}
{{ Content.E11.S' . $i . '.TotalCount.m }}
{% else %}
{% endif %}
')
->styleBackgroundColor('lightgrey')
->styleBorderRight()
->styleTextBold(), '7.5%'
)
->addElementColumn((new Element())
->setContent('
{% if (Content.E11.S' . $i . '.TotalCount.w is not empty) %}
{{ Content.E11.S' . $i . '.TotalCount.w }}
{% else %}
{% endif %}
')
->styleBackgroundColor('lightgrey')
->styleTextBold(), '7.5%'
);
$sliceList[] = (new Slice())
->styleAlignCenter()
->styleBorderBottom()
->styleBorderLeft()
->styleBorderRight()
->addSection($section);
}
return $sliceList;
}
}