concrete/src/File/Image/Thumbnail/Type/Type.php
public static function getByHandle($ftTypeHandle)
    {
        $ftTypeHandle = (string) $ftTypeHandle;
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        $item = $cache->getItem('file/image/thumbnail/' . $ftTypeHandle);
        if ($item->isMiss()) {
            $em = $app->make(EntityManagerInterface::class);
            $repo = $em->getRepository(ThumbnailTypeEntity::class);
            $result = $repo->findOneBy(['ftTypeHandle' => $ftTypeHandle]);
            $cache->save($item->set($result));
        } else {
            $result = $item->get();
        }

        return $result;
    }
public static function getByHandle($ftTypeHandle)
    {
        $ftTypeHandle = (string) $ftTypeHandle;
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        $item = $cache->getItem('file/image/thumbnail/' . $ftTypeHandle);
        if ($item->isMiss()) {
            $em = $app->make(EntityManagerInterface::class);
            $repo = $em->getRepository(ThumbnailTypeEntity::class);
            $result = $repo->findOneBy(['ftTypeHandle' => $ftTypeHandle]);
            $cache->save($item->set($result));
        } else {
            $result = $item->get();
        }

        return $result;
    }
public static function getByHandle ( $ ftTypeHandle ) { $ ftTypeHandle = ( string ) $ ftTypeHandle ; $ app = Application :: getFacadeApplication ( ) ; $ cache = $ app -> make ( 'cache/request' ) ; $ item = $ cache -> getItem ( 'file/image/thumbnail/' . $ ftTypeHandle ) ; if ( $ item -> isMiss ( ) ) { $ em = $ app -> make ( EntityManagerInterface :: class ) ; $ repo = $ em -> getRepository ( ThumbnailTypeEntity :: class ) ; $ result = $ repo -> findOneBy ( [ 'ftTypeHandle' => $ ftTypeHandle ] ) ; $ cache -> save ( $ item -> set ( $ result ) ) ; } else { $ result = $ item -> get ( ) ; } return $ result ; }
Get a thumbnail type given its handle.

@param string $ftTypeHandle

@return \Concrete\Core\Entity\File\Image\Thumbnail\Type\Type|null
Get a thumbnail type given its handle .