public function themePaths(string $resource): array
    {
        $paths = [];

        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            $paths[] = $resource;
        }

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

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            $paths[] = $themeResource;
        }

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

        return array_reverse($paths);
    }
public function themePaths(string $resource): array
    {
        $paths = [];

        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            $paths[] = $resource;
        }

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

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            $paths[] = $themeResource;
        }

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

        return array_reverse($paths);
    }
public function themePaths ( string $ resource ) : array { $ paths = [ ] ; if ( file_exists ( $ this -> sourceDirectory . '/' . $ resource ) ) { $ paths [ ] = $ resource ; } if ( null === $ this -> theme ) { return $ paths ; } $ themeResource = $ this -> findThemeResource ( $ this -> theme , $ resource ) ; if ( null !== $ themeResource ) { $ paths [ ] = $ themeResource ; } if ( isset ( $ this -> theme [ 'parent' ] ) ) { $ themeResource = $ this -> findThemeResource ( $ this -> theme [ 'parent' ] , $ resource ) ; if ( null !== $ themeResource ) { $ paths [ ] = $ themeResource ; } } return array_reverse ( $ paths ) ; }
Generate a collection of URLs for a Theme's resource

May end up returning an empty array.

@param string $resource

@return array
Generate a collection of URLs for a Theme s resource