eZ\Publish\Core\Repository\SectionService::loadSectionByIdentifier PHP Method

loadSectionByIdentifier() public method

Loads a Section from its identifier ($sectionIdentifier).
public loadSectionByIdentifier ( string $sectionIdentifier ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionIdentifier string
return eZ\Publish\API\Repository\Values\Content\Section
    public function loadSectionByIdentifier($sectionIdentifier)
    {
        if (!is_string($sectionIdentifier) || empty($sectionIdentifier)) {
            throw new InvalidArgumentValue('sectionIdentifier', $sectionIdentifier);
        }
        if ($this->repository->hasAccess('section', 'view') !== true) {
            throw new UnauthorizedException('section', 'view');
        }
        $spiSection = $this->sectionHandler->loadByIdentifier($sectionIdentifier);
        return $this->buildDomainSectionObject($spiSection);
    }