DerDu/SPHERE-Framework

View on GitHub
Application/Api/Education/Certificate/Generator/Repository/CMS/CmsMsHjZ.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace SPHERE\Application\Api\Education\Certificate\Generator\Repository\CMS;

use SPHERE\Application\Education\Certificate\Generator\Repository\Page;
use SPHERE\Application\People\Person\Service\Entity\TblPerson;

/**
 * Class CmsMsHjZ
 * @package SPHERE\Application\Api\Education\Certificate\Generator\Repository\CMS
 */
class CmsMsHjZ extends CmsStyle
{

    /**
     * @param TblPerson|null $tblPerson
     *
     * @return Page
     */
    public function buildPages(TblPerson $tblPerson = null)
    {

        $personId = $tblPerson ? $tblPerson->getId() : 0;

        return (new Page())
            ->addSlice(
                (new CmsMsHj(
                    $this->getTblDivision() ? $this->getTblDivision() : null,
                    $this->getTblPrepareCertificate() ? $this->getTblPrepareCertificate() : null,
                    $this->isSample()
                ))->getCmsMsHjSlice($personId, 'Halbjahreszeugnis der Oberschule')
            );
    }
}