public function setupContenttype(Entity\Entity $entity)
    {
        $contentType = $entity->getContenttype();
        if (is_string($contentType)) {
            $contentTypeData = $this->app['storage']->getContenttype($contentType);
            if ($contentTypeData instanceof ContentType) {
                $contentTypeObject = $contentTypeData;
            } else {
                $contentTypeObject = new ContentType($contentType, $contentTypeData);
            }
            $entity->contenttype = $contentTypeObject;
        }
    }
public function setupContenttype(Entity\Entity $entity)
    {
        $contentType = $entity->getContenttype();
        if (is_string($contentType)) {
            $contentTypeData = $this->app['storage']->getContenttype($contentType);
            if ($contentTypeData instanceof ContentType) {
                $contentTypeObject = $contentTypeData;
            } else {
                $contentTypeObject = new ContentType($contentType, $contentTypeData);
            }
            $entity->contenttype = $contentTypeObject;
        }
    }
public function setupContenttype ( Entity \ Entity $ entity ) { $ contentType = $ entity -> getContenttype ( ) ; if ( is_string ( $ contentType ) ) { $ contentTypeData = $ this -> app [ 'storage' ] -> getContenttype ( $ contentType ) ; if ( $ contentTypeData instanceof ContentType ) { $ contentTypeObject = $ contentTypeData ; } else { $ contentTypeObject = new ContentType ( $ contentType , $ contentTypeData ) ; } $ entity -> contenttype = $ contentTypeObject ; } }
Set the legacy ContentType object on the Entity.

@param Entity\Entity $entity
Set the legacy ContentType object on the Entity .