public function themePathExists(string $resource): bool
    {
        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            return true;
        }

        if (null === $this->theme) {
            return false;
        }

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            return true;
        }

        if (isset($this->theme['parent'])) {
            $themeResource = $this->findThemeResource($this->theme['parent'], $resource);
            if (null !== $themeResource) {
                return true;
            }
        }

        return false;
    }
public function themePathExists(string $resource): bool
    {
        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            return true;
        }

        if (null === $this->theme) {
            return false;
        }

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            return true;
        }

        if (isset($this->theme['parent'])) {
            $themeResource = $this->findThemeResource($this->theme['parent'], $resource);
            if (null !== $themeResource) {
                return true;
            }
        }

        return false;
    }
public function themePathExists ( string $ resource ) : bool { if ( file_exists ( $ this -> sourceDirectory . '/' . $ resource ) ) { return true ; } if ( null === $ this -> theme ) { return false ; } $ themeResource = $ this -> findThemeResource ( $ this -> theme , $ resource ) ; if ( null !== $ themeResource ) { return true ; } if ( isset ( $ this -> theme [ 'parent' ] ) ) { $ themeResource = $ this -> findThemeResource ( $ this -> theme [ 'parent' ] , $ resource ) ; if ( null !== $ themeResource ) { return true ; } } return false ; }
Check to see if a given Theme resource exists anywhere on disk

@param string $resource

@return bool
Check to see if a given Theme resource exists anywhere on disk