Application/Api/Document/Standard/Repository/KamenzReportGym/C01.php
<?php
/**
* Created by PhpStorm.
* User: lehmann
* Date: 27.06.2017
* Time: 09:03
*/
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 C01
{
public static function getContent()
{
$sliceList = array();
$sliceList[] = (new Slice())
->styleTextBold()
->styleMarginTop('20px')
->styleMarginBottom('5px')
->addElement((new Element())
->setContent('C01. Anzahl der Schüler, die im <u>Schuljahr {{ Content.SchoolYear.Past }}</u>
diese Schule besucht haben und nicht versetzt </br>
worden sind, nach Klassen- bzw. Jahrgangsstufen')
);
$sliceList[] = (new Slice())
->styleBackgroundColor('lightgrey')
->styleAlignCenter()
->styleBorderTop()
->styleBorderBottom()
->styleBorderLeft()
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Merkmal')
->styleBorderRight()
->stylePaddingTop('17.7px')
->stylePaddingBottom('17.6px'), '10%'
)
->addSliceColumn((new Slice())
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Klassen- bzw. Jahrgangsstufe')
->styleBorderRight()
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('5')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('6')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('7')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('8')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('9')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('10')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('11')
->styleBorderBottom()
->styleBorderRight(), '10%'
)
->addElementColumn((new Element())
->setContent('12')
->styleBorderBottom()
->styleBorderRight()
, '10%'
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight()
, '5%'
)
), '80%'
)
->addSliceColumn((new Slice())
->styleTextBold()
->addSection((new Section())
->addElementColumn((new Element())
->setContent('Insgesamt')
->styleBorderBottom()
->styleBorderRight()
->stylePaddingTop('8.6px')
->stylePaddingBottom('8.5px')
)
)
->addSection((new Section())
->addElementColumn((new Element())
->setContent('m')
->styleBorderRight(), '50%'
)
->addElementColumn((new Element())
->setContent('w')
->styleBorderRight(), '50%'
)
), '10%'
)
);
$section = new Section();
$section
->addElementColumn((new Element())
->setContent('Schüler')
->stylePaddingLeft('5px')
->styleBackgroundColor('lightgrey')
->styleBorderRight(), '10%'
);
for ($level = 5; $level < 13; $level++) {
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.C01.L' . $level . '.m is not empty) %}
{{ Content.C01.L' . $level . '.m }}
{% else %}
{% endif %}
')
->styleAlignCenter()
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('
{% if (Content.C01.L' . $level . '.w is not empty) %}
{{ Content.C01.L' . $level . '.w }}
{% else %}
{% endif %}
')
->styleAlignCenter()
->styleBorderRight(), '5%'
);
}
$section
->addElementColumn((new Element())
->setContent('
{% if (Content.C01.TotalCount.m is not empty) %}
{{ Content.C01.TotalCount.m }}
{% else %}
{% endif %}
')
->styleBackgroundColor('lightgrey')
->styleAlignCenter()
->styleBorderRight(), '5%'
)
->addElementColumn((new Element())
->setContent('
{% if (Content.C01.TotalCount.w is not empty) %}
{{ Content.C01.TotalCount.w }}
{% else %}
{% endif %}
')
->styleBackgroundColor('lightgrey')
->styleAlignCenter()
->styleBorderRight(), '5%'
);
$sliceList[] = (new Slice())
->styleBorderBottom()
->styleBorderLeft()
->addSection($section);
return $sliceList;
}
}