public static function check(ComponentBase $component, $fileName)
    {
        $partial = new static($component);
        $filePath = $partial->getFilePath($fileName);
        if (!strlen(File::extension($filePath))) {
            $filePath .= '.'.$partial->getDefaultExtension();
        }

        return File::isFile($filePath);
    }
public static function check(ComponentBase $component, $fileName)
    {
        $partial = new static($component);
        $filePath = $partial->getFilePath($fileName);
        if (!strlen(File::extension($filePath))) {
            $filePath .= '.'.$partial->getDefaultExtension();
        }

        return File::isFile($filePath);
    }
public static function check ( ComponentBase $ component , $ fileName ) { $ partial = new static ( $ component ) ; $ filePath = $ partial -> getFilePath ( $ fileName ) ; if ( ! strlen ( File :: extension ( $ filePath ) ) ) { $ filePath .= '.' . $ partial -> getDefaultExtension ( ) ; } return File :: isFile ( $ filePath ) ; }
Returns true if the specific component contains a matching partial.
@param \Cms\Classes\ComponentBase $component Specifies a component the file belongs to.
@param string $fileName Specifies the file name to check.
@return bool
Returns true if the specific component contains a matching partial .