Get assets required by this field.

@return array
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');
    }
446285
protected function resolveAssets(): ?string
    {
        $module = $this->getModuleInfo();
        if (!isset($module['assets'])) {
            return null;
        }
        $directory = $this->directory() . DIRECTORY_SEPARATOR . trim($module['assets'], DIRECTORY_SEPARATOR);
        return is_dir($directory) ? realpath($directory) : null;
    }
625222
public function getFields()
    {
        $models = array();

        /**
         * @var Form_Field $form_field
         * @var Field $model_field
         */
        foreach ($this->field_associations as $form_field => $model_field) {
            $v = $this->form->get($form_field);
            $model_field->set($v);
            if (!isset($models[$model_field->owner->name])) {
                $models[$model_field->owner->name] = $model_field->owner;
            }
        }

        return $models;
    }
1337932
protected function getAssetsUrl()
    {
        if (isset($this->_assetsUrl)) {
            return $this->_assetsUrl;
        } else {
            $assetsPath = Yii::getPathOfAlias('auth.assets');
            $assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, $this->forceCopyAssets);

            return $this->_assetsUrl = $assetsUrl;
        }
    }
101771
protected function getAccountFields()
    {
        return array(
            Tag::ContractCode => array(
                'type' => 'text',
                'label' => $this->t('field_code'),
                'attributes' => array(
                    'required' => true,
                    'size' => 20,
                ),
            ),
            Tag::UserName => array(
                'type' => 'text',
                'label' => $this->t('field_username'),
                'attributes' => array(
                    'required' => true,
                    'size' => 20,
                ),
            ),
            Tag::Password => array(
                'type' => 'password',
                'label' => $this->t('field_password'),
                'attributes' => array(
                    'required' => true,
                    'size' => 20,
                ),
            ),
            Tag::EmailOnError => array(
                'type' => 'email',
                'label' => $this->t('field_emailonerror'),
                'description' => $this->t('desc_emailonerror'),
                'attributes' => array(
                    'required' => true,
                    'size' => 20,
                ),
            ),
        );
    }
175769
protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
291242
public static function getAllArguments() {
		if(self::$arguments === array())
			self::$arguments = array_merge($_GET, $_POST, $_FILES);

		return self::$arguments;
	}
39727
public static function getAssets(){

    // first call? include styles and javascript
    if(static::$didAssets)
      return '';

    ob_start();

    if(ref::config('stylePath') !== false){
      ?>
      <style scoped>
        <?php readfile(str_replace('{:dir}', __DIR__, ref::config('stylePath'))); ?>
      </style>
      <?php
    }

    if(ref::config('scriptPath') !== false){
      ?>
      <script>
        <?php readfile(str_replace('{:dir}', __DIR__, ref::config('scriptPath'))); ?>
      </script>
      <?php
    }

    // normalize space and remove comments
    $output = preg_replace('/\s+/', ' ', trim(ob_get_clean()));
    $output = preg_replace('!/\*.*?\*/!s', '', $output);
    $output = preg_replace('/\n\s*\n/', "\n", $output);

    static::$didAssets = true;
    return $output;
  }
186624
public function scripts()
	{
		$assets = array();
		
		foreach ($this->assets as $asset) {
			if ('js' !== $asset['ext']) {
				continue;
			}
			
			$assets[] = $this->route ? $asset : $this->process($asset);
		}
		
		if (empty($assets)) {
			return '';
		}
		
		if ($this->route) {
			return $this->prepareForController($assets, 'script');
		}
		
		if ($this->combine) {
			$assets = $this->combine($assets, 'script');
		}
		
		$links = array();
		foreach ($assets as $asset) {
			$url = $this->cdn ? $this->cdn . $asset['url'] : $asset['url'];
			$links[] = HTML::script($url, $asset['attributes']);
		}
		
		return implode('', $links);
	}
1054557
public function renderAssets()
    {
        // Retrieve path to Resources and shortname's class
        $class = $this->getClass();
        $path = $class['resources'].S.'assets'.S;

        // Get assets
        $script = $this->getModel()->getScript();
        $style = $this->getModel()->getStyle();

        $assets = [];

        // Do nothing if all empty
        if (empty($script) && empty($style)) {
            return $assets;
        }

        // Scripts
        if (!empty($script)) {
            $assets[$script] = $path.$script;
        }

        // Styles
        if (!empty($style)) {
            $assets[$style] = $path.$style;
        }

        return $assets;
    }
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(),
        ];
    }
313206
public static function getAssetCompressFiles(): array
    {
        $helper = new FrontendBridgeHelper(new View());
        $dependencies = $helper->compileDependencies();
        $plugins = array_map('\Cake\Utility\Inflector::underscore', Plugin::loaded());

        foreach ($dependencies as $n => $dependency) {
            $parts = explode('/', $dependency);
            if (empty($parts[0]) && in_array($parts[1], $plugins)) {
                $prefix = '/' . $parts[1] . '/';
                $dependency = preg_replace(
                    '/^' . str_replace('/', '\/', $prefix) . '/',
                    'plugin:' . Inflector::camelize($parts[1]) . ':',
                    $dependency
                );
            }
            if (substr($dependency, 0, 4) == '/js/') {
                $dependency = substr($dependency, 4);
            }
            $dependencies[$n] = $dependency;
        }

        return $dependencies;
    }
1307134
protected function getAssetsUrl()
    {
        if (!isset($this->_assetsUrl)) {
            $assetPath = dirname(__DIR__) . '/assets';
            $this->_assetsUrl = Yii::app()->assetManager->publish($assetPath, false, -1, $this->forceCopyAssets);
        }
        return $this->_assetsUrl;
    }
209377
public function getRequiredFields()
    {
        $rules = $this->getRules();

        $requiredFields = array_where(
            $rules, function ($value, $key) {
                if (is_array($value)) {
                    $value = implode('|', $value);
                }

                return str_contains($value, ['required', 'sometimes']);
            }
        );

        return $requiredFields;
    }
910920
public function getRequiredJSFiles()
    {
        $files = [];
        
        foreach (ClassInfo::subclassesFor(ContentController::class) as $controller) {
            
            if ($required_js = Injector::inst()->get($controller)->getRequiredJS()) {
                
                foreach ($required_js as $file) {
                    
                    $file = ModuleResourceLoader::singleton()->resolvePath($file);
                    
                    if (!isset($files[$file])) {
                        $files[$file] = file_get_contents(Director::getAbsFile($file));
                    }
                    
                }
                
            }
            
        }
        
        return $files;
    }
778803
public function getAssetsUrl()
    {
        if (isset($this->_assetsUrl)) {
            return $this->_assetsUrl;
        } else {
            $forceCopyAssets = $this->getApi()->forceCopyAssets;
            $path = Yii::getPathOfAlias('yiiwheels');
            $assetsUrl = Yii::app()->assetManager->publish(
                $path . DIRECTORY_SEPARATOR . 'assets',
                false,
                -1,
                $forceCopyAssets
            );

            return $this->_assetsUrl = $assetsUrl;
        }
    }
1105686
public function assets()
    {
        $assets_path = __DIR__.DS.'assets'.DS;
        $path = str_replace("doc/assets", "", $this->request->pathinfo());
        $ext = $this->request->ext();
        if($ext)
        {
            $type= "text/html";
            $content = file_get_contents($assets_path.$path);
            if(array_key_exists($ext, $this->mimeType))
            {
                $type = $this->mimeType[$ext];
            }
            return response($content, 200, ['Content-Length' => strlen($content)])->contentType($type);
        }
    }