public function getImage(NewsCategoryModel $category)
    {
        if (null === ($image = $category->getImage()) || !\is_file(TL_ROOT.'/'.$image->path)) {
            return null;
        }

        return $image;
    }
public function getImage(NewsCategoryModel $category)
    {
        if (null === ($image = $category->getImage()) || !\is_file(TL_ROOT.'/'.$image->path)) {
            return null;
        }

        return $image;
    }
public function getImage ( NewsCategoryModel $ category ) { if ( null === ( $ image = $ category -> getImage ( ) ) || ! \ is_file ( TL_ROOT . '/' . $ image -> path ) ) { return null ; } return $ image ; }
Get the image.

@param NewsCategoryModel $category

@return \Contao\FilesModel|null
Get the image .