Plugin Definition =================
481963
function Plugin(option) {
    return this.each(function () {
      var $this = $(this);
      var data  = $this.data(DataKey);

      if (!data) {
        var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
        $this.data(DataKey, (data = new ControlSidebar($this, options)));
      }

      if (typeof option == 'string') data.toggle();
    });
  }
501025
private PluginDefinition pluginById(String id) {
        PluginDefinition def = pluginRegistry.get(id);
        
        if (def == null) {
            throw new PluginException(EXC_UNKNOWN_PLUGIN, null, null, id);
        }
        
        return def;
    }
664911
final public function definition() {
        $plugin = $this->_customdata['lock'];

        $this->_form->addElement('hidden', 'action', 'newlockinstance');
        $this->_form->setType('action', PARAM_ALPHANUMEXT);
        $this->_form->addElement('hidden', 'lock', $plugin);
        $this->_form->setType('lock', PARAM_COMPONENT);
        $this->_form->addElement('text', 'name', get_string('lockname', 'cache'));
        $this->_form->setType('name', PARAM_ALPHANUMEXT);
        $this->_form->addRule('name', get_string('required'), 'required');
        $this->_form->addElement('static', 'namedesc', '', get_string('locknamedesc', 'cache'));

        $this->plugin_definition();

        $this->add_action_buttons();
    }
476598
function pluginOnload( value ) {
            resource.state = MODULE_COMPLETED;
            resource.exports = value || true;
            modFireDefined( pluginAndResource );
        }
1374945
function withPlugins(fn) {
  return function() {
    const args = Array.from(arguments);
    let plugins = (args[1] && args[1].plugins) || [];
    if (!isArray(plugins)) {
      plugins = Object.values(plugins);
    }
    args[1] = Object.assign({}, args[1], {
      plugins: internalPlugins.concat(plugins)
    });
    return fn.apply(null, args);
  };
}
226787
function plugin(suite) {
	// Instance
	var instance = {
		devices: [],
		// Register the plugin's name
		name: pkg.name
	};
	// Options
	var options = util.extend({}, defaultConfig, suite.options);

	// // Dependencies
	// // Add the plugin's `root`
	// suite.addRoot(path.join(__dirname, 'defaults'));
	// // API
	// suite.api.browser = {};

	// Listen for a new Session creation
	suite.on('create session', function (session) {
		session.on('pre run', function () {
			instance.devices.each = util.forEachSeries(instance.devices);
			// var devices = [];
			// before(function () {
			//   this.plugins.browser = {};
			//   this.plugins.browser.devices = devices;
			//   devices.each = util.forEachSeries(devices);
			// });

			before(function (done) {
				this.timeout(options.timeout);

				// this.plugins[name] = ctx;

				if (!instance.devices.length) {
					// throw new Error(name + ': A device must be in use to run tests.');
					throw new Error('A device must be in use to run tests.');
				}

				// Load the choosen devices
				instance.devices.each(function (device, next) {
					device.start(next);
				}, done);
			});

			after(function (done) {
				instance.devices.each(function (device, next) {
					device.stop(next);
				}, done);
			});
		});
	});

	return instance;
}
666198
function use(plugin, options){
  utils.assertString(plugin, 'plugin');

  if (options) {
    utils.assertType(options, 'object', 'options');
    options = parseObject(options);
  }

  // lookup
  plugin = plugin.string;
  var found = utils.lookup(plugin, this.options.paths, this.options.filename);
  if (!found) throw new Error('failed to locate plugin file "' + plugin + '"');

  // use
  var fn = require(path.resolve(found));
  if ('function' != typeof fn) {
    throw new Error('plugin "' + plugin + '" does not export a function');
  }
  this.renderer.use(fn(options || this.options));
}
320802
function( element, options ) {
                Boilerplate.call( this, element, options || {}, defaults || {} );
                MyPlugin.call( this, element, options );
                return this;
            }
1359977
function plugin(options){
  options = options || {};
  var keys = options.keys || [];

  return function(files, metalsmith, done){
    setImmediate(done);
    Object.keys(files).forEach(function(file){
      debug('checking file: %s', file);
      if (!markdown(file)) return;
      var data = files[file];
      var dir = dirname(file);
      var html = basename(file, extname(file)) + '.html';
      if ('.' != dir) html = dir + '/' + html;

      debug('converting file: %s', file);
      var str = mmd.convert(data.contents.toString(), options);
      data.contents = new Buffer(str);
      keys.forEach(function(key) {
        data[key] = mmd.convert(data[key], options);
      });

      delete files[file];
      files[html] = data;
    });
  };
}
1004667
function plugin() {
  return function(style){
    style.include(__dirname);

    if (Canvas) {
      style.define('has-canvas', nodes.true);

      // gradients
      style.define('create-gradient-image', gradient.create);
      style.define('gradient-data-uri', gradient.dataURL);
      style.define('add-color-stop', gradient.addColorStop);

      // color images
      style.define('create-color-image', colorImage.create);
      style.define('color-data-uri', colorImage.dataURL);
    } else {
      style.define('has-canvas', nodes.false);
    }
  };
}
345796
function(plugin, pluginName) {
			if (plugin.environments) {
				Object.keys(plugin.environments).forEach(function(envName) {
					this.define(pluginName + "/" + envName, plugin.environments[envName]);
				}, this);
			}
		}
457148
function plugin(plugins) {
      var z, method, conf;
      for(z in plugins) {
        if(typeof plugins[z] === 'function') {
          method = plugins[z];
        }else{
          method = plugins[z].plugin;
          conf = plugins[z].conf;
        }
        if(opts.field && typeof method[opts.field] === 'function') {
          method = method[opts.field];
        }
        method.call(proto, conf);
      }
      return main;
    }
1093051
def add_plugin(self, plugin):
        

        item = {}
        item.update(defaults["common"])
        item.update(defaults["plugin"])

        for member in ["pre11",
                       "name",
                       "label",
                       "optional",
                       "category",
                       "actions",
                       "id",
                       "order",
                       "doc",
                       "type",
                       "module",
                       "match",
                       "hasRepair",
                       "families",
                       "contextEnabled",
                       "instanceEnabled",
                       "__instanceEnabled__",
                       "path"]:
            item[member] = plugin[member]

        # Visualised in Perspective
        item["familiesConcatenated"] = ", ".join(plugin["families"])

        # converting links to HTML
        pattern = r"(https?:\/\/(?:w{1,3}.)?[^\s]*?(?:\.[a-z]+)+)"
        pattern += r"(?![^<]*?(?:<\/\w+>|\/?>))"
        if item["doc"] and re.search(pattern, item["doc"]):
            html = r"<a href='\1'><font color='FF00CC'>\1</font></a>"
            item["doc"] = re.sub(pattern, html, item["doc"])

        # Append GUI-only data
        item["itemType"] = "plugin"
        item["hasCompatible"] = True
        item["isToggled"] = plugin.get("active", True)
        item["verb"] = {
            "Selector": "Collect",
            "Collector": "Collect",
            "Validator": "Validate",
            "Extractor": "Extract",
            "Integrator": "Integrate",
            "Conformer": "Integrate",
        }.get(item["type"], "Other")

        for action in item["actions"]:
            if action["on"] == "all":
                item["actionsIconVisible"] = True

        self.add_section(item["verb"])

        item = self.add_item(item)
        self.plugins.append(item)
1254143
function pluginify(name, classname, iterate = true, shorthand = false, ignoreWarning = false) {

  if ( typeof name == 'undefined' || typeof classname == 'undefined' ) {
    console.warn('Pluginify requires a name and class reference');
    return false;
  }

  if (!window.jQuery && !ignoreWarning) {

    console.error(`Pluginify tried to turn "${name}" into a jQuery plugin, but jQuery was not found.`)

  } else {

    let dataName = `__${name}`;
    let old = $.fn[name];
    let warned = false;

    $.fn[name] = function (...option) {

      if (iterate) {

        return this.each((index, element) => {

          let $this = $(element);
          let data = $this.data(dataName);
          let options = $.extend({}, classname.defaults, $this.data(), typeof option === 'object' && option);

          if (!data) {
            $this.data(dataName, (data = new classname(this, options)));
          } else {
            if (!warned) {
              console.warn($this[0],  " These items have already been set to iterate already");
            }
            warned = true;
          }

          if (typeof option === 'string') {
            data[option]();
          }

        });

      } else {

        let $this = $(this);
        let data = $this.data(dataName);
        let options = $.extend({}, classname.defaults, $this.data(), typeof option === 'object' && option);

        if (!data) {
          $this.data(dataName, (data = new classname(this, options)));
        } else {
          if (!warned) {
            console.warn($this[0],  " These items have already been set to iterate already");
          }
          warned = true;
        }

        if (typeof option === 'string') {
          data[option]();
        }

        return data;

      }

    };

    // Generate a shorthand as $.pluginName
    if (shorthand) {
      $[name] = (options) => $({})[name](options);
    }

    // - No conflict
    $.fn[name].noConflict = () => $.fn[name] = old;

  }
}
997021
function Plugin(options) {
    this.each(function () {
      var $this = $(this);
      var data = $this.data('bui.slugger');

      if (!data) {
        data = new Slugger($this, options);
        $this.data('bui.slugger', data);
      }

      data.updateSlug();
    });

    return this;
  }
968868
function(plugin, config) {	
	config = config || {};
	config.node = this;
	return localnwt.plugin(plugin, config);
}
1012874
function Plugin(script, _interface, options) {
  this._script = script
  this._options = options || {}
  this._initialInterface = _interface || {}
  this._connect()
}