public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        if (!array_key_exists('SectionIdentifierCriterion', $data)) {
            throw new Exceptions\Parser('Invalid <SectionIdentifierCriterion> format');
        }
        $section = $this->sectionService->loadSectionByIdentifier($data['SectionIdentifierCriterion']);

        return new SectionIdCriterion($section->id);
    }
public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        if (!array_key_exists('SectionIdentifierCriterion', $data)) {
            throw new Exceptions\Parser('Invalid <SectionIdentifierCriterion> format');
        }
        $section = $this->sectionService->loadSectionByIdentifier($data['SectionIdentifierCriterion']);

        return new SectionIdCriterion($section->id);
    }
public function parse ( array $ data , ParsingDispatcher $ parsingDispatcher ) { if ( ! array_key_exists ( 'SectionIdentifierCriterion' , $ data ) ) { throw new Exceptions \ Parser ( 'Invalid <SectionIdentifierCriterion> format' ) ; } $ section = $ this -> sectionService -> loadSectionByIdentifier ( $ data [ 'SectionIdentifierCriterion' ] ) ; return new SectionIdCriterion ( $ section -> id ) ; }
Parses input structure to a SectionIdentifier Criterion object.

@param array $data
@param \eZ\Publish\Core\REST\Common\Input\ParsingDispatcher $parsingDispatcher

@throws \eZ\Publish\Core\REST\Common\Exceptions\Parser

@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\SectionId
Parses input structure to a SectionIdentifier Criterion object .