Creates and returns the Plugin object of this Template object.

@return	Plugin

@see		PluginInterface::getPlugin()
483013
public function getPlugin() {
	
		$folder = $this->getBaseFolder() . '/' . strtolower(str_replace(array(' ', '_'), '', $this->name));
		$dateReleased = $this->dateReleased->format('Y-m-d');
		
		// special parameters for Template plugin
		$options = [
			'derived' => (string)\intval($this->derived),
			'palette' => implode(',', $this->palette)
		];
		
		$plugin = new Plugin('Template', $this->name, $this->version, $dateReleased, $this->appVersion, $folder, $options);
	
		return $plugin;
	
	}
824300
public function get($name)
    {
        if (!$this->has($name)) {
            throw new MissingPluginException(['plugin' => $name]);
        }

        return $this->plugins[$name];
    }
1364154
public static function &getCookies() {
		static $instance;
		//only create a new plugin instance if it has not been created before
		if (!isset($instance)) {
			$instance = new Cookies(Config::get()->get('apikey'));
		}
		return $instance;
	}
275994
public static function get($plugin) {
        $dir = core_component::get_component_directory('tinymce_' . $plugin);
        require_once($dir . '/lib.php');
        $classname = 'tinymce_' . $plugin;
        return new $classname($plugin);
    }
499809
private function savePlugin(Plugin $plugin)
    {
        $this
            ->pluginObjectManager
            ->persist($plugin);

        $this
            ->pluginObjectManager
            ->flush($plugin);

        return $this;
    }
943632
public function getActiveViewPlugins()
    {
        $ret = $this->_getSetting('plugins');
        $d = $this->getData();
        if ($d->isPage) {
            while ($d) {
                foreach (Kwc_Abstract::getSetting($d->componentClass, 'pluginsInherit') as $i) {
                    if (!in_array($i, $ret)) $ret[] = $i;
                }
                $d = $d->parent;
            }
        }
        return $ret;
    }
1151434
public function getPlugin($name)
    {
        if (!$this->has($name)) {
            throw new PluginNotFoundException($name, array_keys($this->plugins));
        }

        return $this->plugins[$name];
    }
697395
public function getBundle($plugin)
    {
        $shortName = $this->getPluginShortName($plugin);

        foreach ($this->getInstalledBundles() as $bundle) {
            if ($bundle['instance']->getName() === $shortName) {
                return $bundle['instance'];
            }
        }

        return null;
    }
1350817
public Plugin[] getPlugins() {
		if (mPluginContext != null) {
			Collection c = mPluginContext.getPlugins().values();
			if (c != null) {
				return (Plugin[])c.toArray(new Plugin[c.size()]);
			}
		}
		return new Plugin[0];
	}
164806
public function load()
	{
		if( $this->cacheType() === "data" )
		{
			$ref = new \ReflectionClass($this);
			$cache_name = Str::snake($ref->getShortName());
			$cache_data = $this->cacheData();

			if( isset($cache_data["id"]) )
			{
				$id = $cache_data["id"];
				unset($cache_data["id"]);
			}
			else
			{
				$id = $cache_data;
			}

			$cache = new Cache( $id, "plugin/" . $cache_name, $cache_data );
			if( $cache->ready() )
			{
				$this->plugin_data = $cache->import();
			}
			else
			{
				$this->loadPluginData();
				$cache->export($this->plugin_data);
			}
		}
		else
		{
			$this->loadPluginData();
		}

		return $this;
	}
268995
static function plugins()
    {
        if (! self::isEnabledPlugins() )
            throw new \Exception('Using Plugins depends on Poirot/Ioc; that not exists currently.');


        if (! self::$pluginManager )
            self::$pluginManager = new PluginsHttpHeader;

        return self::$pluginManager;
    }
1082411
public function getPlugin($name)
    {
        if (!isset($this->plugins[$name])) {
            throw new \InvalidArgumentException(sprintf('Plugin %s is not registered'));
        }

        return $this->plugins[$name];
    }
617788
function Plugin() {
    this.each(function () {
      var $this = $(this);
      var data = $this.data('bui.disable');

      if (!data) {
        data = new Disable($this);
        $this.data('bui.disable', data);
      }

      data.toggle();
    });

    return this;
  }
951160
public function get_plugin( $data = '' ) {
		// Get all the data.
		if ( ! $data ) {
			return $this->plugin;
		}

		// Get specific plugin data.
		if ( ! empty( $this->plugin[ $data ] ) ) {
			return $this->plugin[ $data ];
		}

		return null;
	}
939567
public function getPlugin(string $pluginName): ExtensionPluginInterface
    {
        if (!isset($this->plugins[$pluginName])) {
            throw new RuntimeException(
                sprintf(
                    'Extension plugin "%s" does not exist',
                    $pluginName
                )
            );
        }

        return $this->plugins[$pluginName];
    }
1002808
public function getPlugin($identifier)
    {
        $identifier = strtolower($identifier);
        if (isset($this->_plugins[$identifier])) {
            return $this->_plugins[$identifier];
        }
        return false;
    }
67220
public static function loadPlugin($name)
    {
        $name = ucfirst($name);
        if (($config = &self::getRef("plugins.$name")) === null) {
            $config = array();
        }
        return self::loadCustomPlugin($name, $config);
    }