src/PHPDish/Bundle/ThemeBundle/Templating/Loader/FileLocator.php
public function locate($file, $currentPath = null, $first = true)
    {
        if ($this->currentTheme && $file[0] === '@') {
            $bundleName = substr($file, 1);
            if (false !== strpos($bundleName, '/')) {
                list($bundleName, $path) = explode('/', $bundleName, 2);
            }
            if (in_array($bundleName, $this->themeManager->getNamespaces())) {
                try {
                    $filePath = $this->_kernel->locateResource($file,
                        $this->currentTheme->getPath(), $first);
                    return $filePath;
                } catch (\Exception $exception) {
                    //Ignore if not found in theme.
                }
            }
        }
        return parent::locate($file, $currentPath);
    }
public function locate($file, $currentPath = null, $first = true)
    {
        if ($this->currentTheme && $file[0] === '@') {
            $bundleName = substr($file, 1);
            if (false !== strpos($bundleName, '/')) {
                list($bundleName, $path) = explode('/', $bundleName, 2);
            }
            if (in_array($bundleName, $this->themeManager->getNamespaces())) {
                try {
                    $filePath = $this->_kernel->locateResource($file,
                        $this->currentTheme->getPath(), $first);
                    return $filePath;
                } catch (\Exception $exception) {
                    //Ignore if not found in theme.
                }
            }
        }
        return parent::locate($file, $currentPath);
    }
{@inheritdoc}