Search in sources :

Example 1 with ContentTypeMapper

use of com.enonic.xp.lib.content.mapper.ContentTypeMapper in project xp by enonic.

the class ContentTypeHandler method getContentType.

public ContentTypeMapper getContentType() {
    if (name == null || name.isBlank()) {
        return null;
    }
    final GetContentTypeParams params = GetContentTypeParams.from(ContentTypeName.from(name));
    final ContentType ctype = contentTypeService.get().getByName(params);
    return ctype == null ? null : new ContentTypeMapper(inlineMixins(ctype));
}
Also used : GetContentTypeParams(com.enonic.xp.schema.content.GetContentTypeParams) ContentType(com.enonic.xp.schema.content.ContentType) ContentTypeMapper(com.enonic.xp.lib.content.mapper.ContentTypeMapper)

Aggregations

ContentTypeMapper (com.enonic.xp.lib.content.mapper.ContentTypeMapper)1 ContentType (com.enonic.xp.schema.content.ContentType)1 GetContentTypeParams (com.enonic.xp.schema.content.GetContentTypeParams)1