Converter/ContentTypesHelper.php
public function getContentTypesByIdentifier($identifier)
    {
        if (strstr($identifier, ',')) {
            $contentTypeArray = explode(',', $identifier);
        } else {
            $contentTypeArray[] = $identifier;
        }

        $contentTypesCollection = array();
        foreach ($contentTypeArray as $contentTypeIdentifier) {
            if (!empty($contentTypeIdentifier)) {
                $contentTypesCollection[] = $this->contentTypeService->loadContentTypeByIdentifier($contentTypeIdentifier);
            }
        }

        return $contentTypesCollection;
    }
public function getContentTypesByIdentifier($identifier)
    {
        if (strstr($identifier, ',')) {
            $contentTypeArray = explode(',', $identifier);
        } else {
            $contentTypeArray[] = $identifier;
        }

        $contentTypesCollection = array();
        foreach ($contentTypeArray as $contentTypeIdentifier) {
            if (!empty($contentTypeIdentifier)) {
                $contentTypesCollection[] = $this->contentTypeService->loadContentTypeByIdentifier($contentTypeIdentifier);
            }
        }

        return $contentTypesCollection;
    }
public function getContentTypesByIdentifier ( $ identifier ) { if ( strstr ( $ identifier , ',' ) ) { $ contentTypeArray = explode ( ',' , $ identifier ) ; } else { $ contentTypeArray [ ] = $ identifier ; } $ contentTypesCollection = array ( ) ; foreach ( $ contentTypeArray as $ contentTypeIdentifier ) { if ( ! empty ( $ contentTypeIdentifier ) ) { $ contentTypesCollection [ ] = $ this -> contentTypeService -> loadContentTypeByIdentifier ( $ contentTypeIdentifier ) ; } } return $ contentTypesCollection ; }
Returns ContentTypes array by ContentType identifier.

@param string $identifier

@return \eZ\Publish\API\Repository\Values\ContentType\ContentType[]
Returns ContentTypes array by ContentType identifier .