public function parseResource($resource)
    {
        $pluginId = $file = null;
        if (isset($resource[0]) && $resource[0] == '@') {
            list($pluginId, $file) = explode('/', $resource, 2);
            $pluginId = substr($pluginId, 1);
        }

        // @deprecated
        if (strpos($resource, ':') !== false) {
            wei()->logger->warning('deprecated view', $resource);
            list($pluginId, $file) = explode(':', $resource, 2);
        }

        if ($pluginId) {
            $plugin = $this->getOneById($pluginId);
            $path = $plugin->getBasePath() . '/resources';

            return ['path' => $path, 'file' => $file];
        } else {
            return ['path' => null, 'file' => $resource];
        }
    }