Returns the associated asset.

@return AssetContract
540534
public function getAsset()
    {
        if ($this->asset === null) {
            $this->asset = AssetFacade::find($this->getAssetId());
        }

        return $this->asset;
    }
809506
protected function _findSource()
    {
        $path = $this->_manager->getPath();

        if ($path->isVirtual($this->_source)) {
            $path = $path->get($this->_source);

            $isStrictMode = $this->_manager->getParams()->get('strict_mode', false, 'bool');
            if ($isStrictMode && !$path) {
                throw new Exception("Asset file not found: {$this->_source}");
            }

            return $path;
        }

        if (Url::isAbsolute($this->_source)) {
            return $this->_source;
        }

        $fullPath = $path->get('root:' . $this->_source);

        return $fullPath;
    }
489733
public static function getAssets()
    {
        switch (config('admin.map_provider')) {
            case 'tencent':
                $js = '//map.qq.com/api/js?v=2.exp&key='.env('TENCENT_MAP_API_KEY');
                break;
            case 'google':
                $js = '//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key='.env('GOOGLE_API_KEY');
                break;
            case 'yandex':
                $js = '//api-maps.yandex.ru/2.1/?lang=ru_RU';
                break;
            default:
                $js = '//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key='.env('GOOGLE_API_KEY');
        }

        return compact('js');
    }
971900
public function getAssetId(): int
    {
        return (isset($this->attrs['asset_id']) && !empty($this->attrs['asset_id'])) ?
            $this->attrs['asset_id'] : 0;
    }
617197
protected function getAssetVersions() {
        if (!$this->_assetVersions) {
            $this->_assetVersions = new AssetVersionList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_assetVersions;
    }
260516
public function get (Asset $asset) : Asset
    {
        $cache = $this->locator->get(AssetsCache::class);
        $cachedAsset = $cache->get($asset);

        if (null !== $cachedAsset)
        {
            return $cachedAsset;
        }

        return $this->addAsset($asset);
    }
980268
public function getAssetFile($file) {
        if (is_file($file)) {
            return new AssetFile($file);
        }
        $ext = pathinfo($file, PATHINFO_EXTENSION);
        if (strpos($file, '@') === 0 && ($ext == 'js' || $ext == 'css')) {
            $file = $ext.'/'. substr($file, 1);
        }
        return new AssetFile(Factory::public_path()->file($this->assetsDirectory.$file));
    }
352828
protected function getAssetFolder()
    {
        $folders = $this->owner->config()->asset_folders;
        
        if (is_array($folders) && isset($folders[static::class])) {
            return $folders[static::class];
        }
    }
1209470
public com.google.api.ads.adwords.axis.v201809.cm.Asset getAsset() {
        return asset;
    }
1144199
public function getArea()
    {
        $area = $this->getArgument('area');
        $allowed = $this->getAllowedAreas();

        if ($area) {
            if (! $this->isAllowedArea($area)) {
                throw new AssetException('Illegal Asset Area: Assets can be only assigned to '.implode(', ', $allowed));
            }

            return $area;
        }

        return reset($allowed);
    }
833642
public static function collectFieldAssets()
    {
        if (!empty(static::$collectedAssets)) {
            return static::$collectedAssets;
        }

        $css = collect();
        $js = collect();

        foreach (static::$availableFields as $field) {
            if (!method_exists($field, 'getAssets')) {
                continue;
            }

            $assets = call_user_func([$field, 'getAssets']);

            $css->push(array_get($assets, 'css'));
            $js->push(array_get($assets, 'js'));
        }

        return static::$collectedAssets = [
            'css' => $css->flatten()->unique()->filter()->toArray(),
            'js' => $js->flatten()->unique()->filter()->toArray(),
        ];
    }
615809
protected function getAsset($assetData)
    {
        try {
            $Comet = \CometPHP\Comet::getInstance();
        } catch (\CometPHP\Exceptions\CometNotBooted $e) {
            return null;
        }

        if (! is_array($assetData)) {
            $assetData = [$assetData];
        }

        $asset = $Comet['template']->getFunction('asset')->call(
            $this->template,
            $assetData
        );

        return $asset;
    }
518539
public function getUsageReferences(AssetInterface $asset)
    {
        $assetIdentifier = $this->persistenceManager->getIdentifierByObject($asset);
        if (isset($this->firstlevelCache[$assetIdentifier])) {
            return $this->firstlevelCache[$assetIdentifier];
        }

        $relatedNodes = array_map(function (NodeData $relatedNodeData) use ($asset) {
            return new AssetUsageInNodeProperties($asset,
                $relatedNodeData->getIdentifier(),
                $relatedNodeData->getWorkspace()->getName(),
                $relatedNodeData->getDimensionValues(),
                $relatedNodeData->getNodeType()->getName()
            );
        }, $this->getRelatedNodes($asset));

        $this->firstlevelCache[$assetIdentifier] = $relatedNodes;
        return $this->firstlevelCache[$assetIdentifier];
    }
619085
public function getAssetManager()
    {
        if (!$this->started) {
            throw new LogicException('Puli was not started');
        }

        if (!$this->assetManager && $this->context instanceof ProjectContext) {
            $this->assetManager = new DiscoveryAssetManager(
                $this->getDiscoveryManager(),
                $this->getServerManager()->getServers()
            );
        }

        return $this->assetManager;
    }
1141486
public function getMergedStylesheet()
    {
        $mergedAsset = $this->getMergedStylesheetAsset();

        $assetFetcher = new StylesheetUIAssetFetcher(Manager::getInstance()->getLoadedPluginsName(), $this->theme);

        $assetMerger = new StylesheetUIAssetMerger($mergedAsset, $assetFetcher, $this->cacheBuster);

        $assetMerger->generateFile();

        return $mergedAsset;
    }
823561
public function getAssets()
    {
        //this is the app directory.
        //the console is in this directory
        $rootDir = $this->container->get('kernel')->getRootDir();
        $appOverrideDir = '/Resources';

        $resources = [];
        $finder = new Finder();
        $finder->files()->name('assetic_injector.json');
        foreach ($this->container->get('kernel')->getBundles() as $bundle) {
            //the number of files found in the override path
            $finderCount = 0;
            //the bundle name
            $bundleName = $bundle->getName();

            //the override path
            $overridePath = $rootDir.$appOverrideDir.'/'.$bundleName.'/config/';

            //does the file exists in the app/Resources
            if (file_exists($overridePath)) {
                $finder->in($overridePath);
                $finderCount = $finder->count();
            }

            //if no files were found
            if ($finderCount === 0) {
                if (file_exists($bundle->getPath().'/Resources/config/')) {
                    $finder->in($bundle->getPath().'/Resources/config/');
                }
            }
        }
        $injectArray = [];
        foreach ($finder as $file) {
            $json = file_get_contents($file);
            if (is_array(json_decode($json, true))) {
                $injectArray = array_merge_recursive($injectArray, json_decode($json, true));
            }
        }

        foreach ($injectArray as $engine => $assets) {
            $engine = $this->container->get('assetic_injector.'.$engine);
            $engine->compute($assets);
            $resources = array_merge_recursive($resources, $engine->getResources());
        }

        return $resources;
    }
284680
public function getAssets()
    {
        $css = $this->theme->getThemeInfoExtendAware('css');
        $js = $this->theme->getThemeInfoExtendAware('javascript');

        return [
            'css' => $css,
            'javascript' => $js,
        ];
    }