public function getWatermarkFilePath()
    {
        $filePath = false;

        if (!($file = $this->getWatermarkFile())) {
            return $filePath;
        }
        $baseDir = $this->uploader->getBasePath();

        $candidates = [
            $baseDir . '/watermark/stores/' . $this->storeManager->getStore()->getId() . $file,
            $baseDir . '/watermark/websites/' . $this->storeManager->getWebsite()->getId() . $file,
            $baseDir . '/watermark/default/' . $file,
            $baseDir . '/watermark/' . $file,
        ];
        foreach ($candidates as $candidate) {
            if ($this->mediaDirectory->isExist($candidate)) {
                $filePath = $this->mediaDirectory->getAbsolutePath($candidate);
                break;
            }
        }
        if (!$filePath) {
            $filePath = $this->viewFileSystem->getStaticFileName($file);
        }

        return $filePath;
    }
public function getWatermarkFilePath()
    {
        $filePath = false;

        if (!($file = $this->getWatermarkFile())) {
            return $filePath;
        }
        $baseDir = $this->uploader->getBasePath();

        $candidates = [
            $baseDir . '/watermark/stores/' . $this->storeManager->getStore()->getId() . $file,
            $baseDir . '/watermark/websites/' . $this->storeManager->getWebsite()->getId() . $file,
            $baseDir . '/watermark/default/' . $file,
            $baseDir . '/watermark/' . $file,
        ];
        foreach ($candidates as $candidate) {
            if ($this->mediaDirectory->isExist($candidate)) {
                $filePath = $this->mediaDirectory->getAbsolutePath($candidate);
                break;
            }
        }
        if (!$filePath) {
            $filePath = $this->viewFileSystem->getStaticFileName($file);
        }

        return $filePath;
    }
public function getWatermarkFilePath ( ) { $ filePath = false ; if ( ! ( $ file = $ this -> getWatermarkFile ( ) ) ) { return $ filePath ; } $ baseDir = $ this -> uploader -> getBasePath ( ) ; $ candidates = [ $ baseDir . '/watermark/stores/' . $ this -> storeManager -> getStore ( ) -> getId ( ) . $ file , $ baseDir . '/watermark/websites/' . $ this -> storeManager -> getWebsite ( ) -> getId ( ) . $ file , $ baseDir . '/watermark/default/' . $ file , $ baseDir . '/watermark/' . $ file , ] ; foreach ( $ candidates as $ candidate ) { if ( $ this -> mediaDirectory -> isExist ( $ candidate ) ) { $ filePath = $ this -> mediaDirectory -> getAbsolutePath ( $ candidate ) ; break ; } } if ( ! $ filePath ) { $ filePath = $ this -> viewFileSystem -> getStaticFileName ( $ file ) ; } return $ filePath ; }
Get relative watermark file path
or false if file not found

@return string | bool
Get relative watermark file path or false if file not found