Loads plugins or a single plugin

@param string|array $name
@return \Krystal\Application\View\PluginBag
779688
public function load($plugins)
    {
        if (!is_array($plugins)) {
            $plugins = (array) $plugins;
        }

        foreach ($plugins as $plugin) {
            if (!isset($this->plugins[$plugin])) {
                trigger_error(sprintf('Attempted to load non-existing plugin %s', $plugin));
                return false;
            }

            if (isset($this->plugins[$plugin]['scripts'])) {
                $this->appendScripts($this->plugins[$plugin]['scripts']);
            }

            if (isset($this->plugins[$plugin]['stylesheets'])) {
                $this->appendStylesheets($this->plugins[$plugin]['stylesheets']);
            }
        }

        return $this;
    }
1220140
protected function loadIndexSchema($name)
    {
        $index = new IndexSchema();
        $this->resolveIndexNames($index, $name);
        $this->resolveIndexType($index);

        if ($this->findColumns($index)) {
            return $index;
        }
        return null;
    }
1161154
protected function load($name)
    {
        foreach ($this->sources as $source) {
            if ($source->has($name)) {
                return $this->transform($source->get($name));
            }
        }

        throw new NotFoundException(sprintf('The svg "%s" is not found', $name));
    }
241466
protected function load($name)
    {
        if ($name instanceof Template) {
            return $name;
        }

        try {
            return $this->environment->loadTemplate((string) $name);
        } catch (LoaderError $e) {
            throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
1195952
public function &load(string $name) : ModularAbstract
    {
        $modular =& $this->internalGetModular($name);
        if (!$this->hasLoaded($name)) {
            $modular->init();
            $this->loadedModular[$this->sanitizeModularName($name)] = true;
        }

        return $modular;
    }
325658
protected function load($name)
    {
        $template = $this->parser->parse($name);

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->loader->load($template);

        if (false === $storage) {
            throw new \InvalidArgumentException(sprintf('The template "%s" does not exist.', $template));
        }

        return $this->cache[$key] = $storage;
    }
216683
protected function load($name)
    {
        $template = $this->nameParser->parse($name);

        if (!$template instanceof TemplateReferenceInterface) {
            throw new \RuntimeException(sprintf('The template "%s" could not be parsed.', $name));
        }

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->loader->load($template);

        if (!$storage instanceof Storage) {
            throw new \RuntimeException(sprintf('The template "%s" could not be loaded.', $name));
        }

        return $this->cache[$key] = $storage;
    }
934560
public function get($name)
    {
        if (isset($this->_loaded[$name])) {
            return $this->_loaded[$name];
        }

        return null;
    }
1205241
public function bag(string $name): InputBag
    {
        // ensure proper request association
        $this->request();

        if (isset($this->bags[$name])) {
            return $this->bags[$name];
        }

        if (!isset($this->bagAssociations[$name])) {
            throw new InputException("Undefined input bag '{$name}'");
        }

        $class = $this->bagAssociations[$name]['class'];
        $data = call_user_func([$this->request(), $this->bagAssociations[$name]['source']]);

        if (!is_array($data)) {
            $data = (array)$data;
        }

        return $this->bags[$name] = new $class($data, $this->prefix);
    }
310193
public static function getTag(string $name)
    {
        if (isset(self::$tags[$name])) {
            return self::$tags[$name];
        }
        $class = '\\sdopx\\plugin\\' . Utils::toCamel($name) . 'Tag';
        if (class_exists($class)) {
            self::$tags[$name] = new $class();
            return self::$tags[$name];
        }
        return null;
    }
164664
public static function getInstance($name)
    {
        if (!self::loaded($name)) {
            throw new MissingPluginException(['plugin' => $name]);
        }

        if (!Arr::key($name, self::$_pluginsList)) {
            $slug  = Str::low($name);
            $table = TableRegistry::get('Extensions.Extensions');

            $entity = $table
                ->find()
                ->where([
                    'slug' => $slug,
                    'type' => EXT_TYPE_PLUGIN
                ])
                ->first();

            self::$_pluginsList[$name] = $entity;
        }

        return self::$_pluginsList[$name];
    }
497175
public function plugin(string $name): \TheCMSThread\Classes\Plugin
    {
        return $this->plugins->get($name);
    }
321109
public static function pluginExists($name) {
	
		$db = Database::getInstance();
		$db->setQuery('SELECT COUNT(1) FROM `modules` WHERE name = ?');
		return (bool)$db->loadCount($name);
	
	}
90627
public function plugin($name = null)
    {
        deprecationWarning('ViewBuilder::plugin() is deprecated. Use ViewBuilder::setPlugin() or ViewBuilder::getPlugin() instead.');
        if ($name !== null) {
            return $this->setPlugin($name);
        }

        return $this->getPlugin();
    }
214987
public static function load($name)
    {
        $fixturePath = realpath(static::$fixturePath . '/' . $name);

        if (empty($fixturePath)) {
            throw new \RuntimeException(sprintf(
                'Unknown fixture %s',
                $name
            ));
        }

        return file_get_contents($fixturePath);
    }
1323692
public function getContainerPlugin($name)
    {
        if (!$this->hasContainerPlugin($name)) {
            throw new PluginException(sprintf('Container plugin "%s" is not registered.', $name));
        }

        return $this->containerPlugins[$name];
    }
1091520
public function loadOrCreateTag($name)
    {
        $tag = $this->loadTag($name);
        if (null === $tag) {
            $tag = $this->createTag($name);
        }

        return $tag;
    }