concrete/src/File/Set/Set.php
protected function shouldRefreshFileThumbnails($fileOperation)
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);
        $qb = $em->createQueryBuilder();
        $qb
            ->select('ft.ftTypeID')
            ->from(ThumbnailType::class, 'ft')
            ->innerJoin('ft.ftAssociatedFileSets', 'ftfs')
            ->andWhere($qb->expr()->eq('ftfs.ftfsFileSetID', ':fsID'))
            ->setParameter('fsID', $this->getFileSetID())
            ->andWhere($qb->expr()->eq('ft.ftLimitedToFileSets', ':limitedTo'))
            ->setParameter('limitedTo', $fileOperation === 'add')
            ->setMaxResults(1)
        ;
        $query = $qb->getQuery();

        return $query->getOneOrNullResult($query::HYDRATE_SINGLE_SCALAR) !== null;
    }
protected function shouldRefreshFileThumbnails($fileOperation)
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);
        $qb = $em->createQueryBuilder();
        $qb
            ->select('ft.ftTypeID')
            ->from(ThumbnailType::class, 'ft')
            ->innerJoin('ft.ftAssociatedFileSets', 'ftfs')
            ->andWhere($qb->expr()->eq('ftfs.ftfsFileSetID', ':fsID'))
            ->setParameter('fsID', $this->getFileSetID())
            ->andWhere($qb->expr()->eq('ft.ftLimitedToFileSets', ':limitedTo'))
            ->setParameter('limitedTo', $fileOperation === 'add')
            ->setMaxResults(1)
        ;
        $query = $qb->getQuery();

        return $query->getOneOrNullResult($query::HYDRATE_SINGLE_SCALAR) !== null;
    }
protected function shouldRefreshFileThumbnails ( $ fileOperation ) { $ app = Application :: getFacadeApplication ( ) ; $ em = $ app -> make ( EntityManagerInterface :: class ) ; $ qb = $ em -> createQueryBuilder ( ) ; $ qb -> select ( 'ft.ftTypeID' ) -> from ( ThumbnailType :: class , 'ft' ) -> innerJoin ( 'ft.ftAssociatedFileSets' , 'ftfs' ) -> andWhere ( $ qb -> expr ( ) -> eq ( 'ftfs.ftfsFileSetID' , ':fsID' ) ) -> setParameter ( 'fsID' , $ this -> getFileSetID ( ) ) -> andWhere ( $ qb -> expr ( ) -> eq ( 'ft.ftLimitedToFileSets' , ':limitedTo' ) ) -> setParameter ( 'limitedTo' , $ fileOperation === 'add' ) -> setMaxResults ( 1 ) ; $ query = $ qb -> getQuery ( ) ; return $ query -> getOneOrNullResult ( $ query :: HYDRATE_SINGLE_SCALAR ) !== null ; }
Check if we should build the thumbnails for files added or removed to this file set should.

@param string $fileOperation 'add' or 'remove'

@return bool
Check if we should build the thumbnails for files added or removed to this file set should .