COLLAPSE PLUGIN DEFINITION ==========================
3845
function Plugin(option) {
    return this.each(function () {
      var $this   = $(this)
      var data    = $this.data('bs.collapse')
      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)

      if (!data && options.toggle && option == 'show') option = !option
      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
      if (typeof option == 'string') data[option]()
    })
  }
736780
function DropdownHover($elem, options) {
	var args = arguments;

	// Is the first parameter an object (options), or was omitted,
	// instantiate a new instance of the plugin.
	if (options === undefined || typeof options === 'object') {
		// This allows the plugin to be called with $.fn.bootstrapDropdownHover();
		if (!$.contains(document, $($elem)[0])) {
			$('[data-toggle="dropdown"]').each(function (index, item) {
				// For each nested select, instantiate the plugin
				console.log(item, $elem);
				$(item).bootstrapDropdownHover(options);
			});
		}
		return $elem.each(function () {
			// If this is not a select
			if (!$(this).hasClass('dropdown-toggle') || $(this).data('toggle') !== 'dropdown') {
				$('[data-toggle="dropdown"]', this).each(function (index, item) {
					// For each nested select, instantiate the plugin

					DropdownHover($(item), options);
				});
			} else if (!$.data(this, 'plugin_' + pluginName)) {
				// Only allow the plugin to be instantiated once so we check
				// that the element has no plugin instantiation yet

				// if it has no instance, create a new one, pass options to our
				// plugin constructor,
				// and store the plugin instance in the elements jQuery data object.
				$.data(this, 'plugin_' + pluginName, new BootstrapDropdownHover(this, options));
			}
		});

		// If the first parameter is a string and it doesn't start
		// with an underscore or "contains" the `init`-function,
		// treat this as a call to a public method.
	} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {

		// Cache the method call to make it possible to return a value
		var returns;

		$elem.each(function () {
			var instance = $.data(this, 'plugin_' + pluginName);
			// Tests that there's already a plugin-instance and checks that
			// the requested public method exists
			if (instance instanceof BootstrapDropdownHover && typeof instance[options] === 'function') {
				// Call the method of our plugin instance, and pass
				// it the supplied arguments.
				returns = instance[options]
					.apply(instance, Array.prototype.slice.call(args, 1));
			}
		});

		// If the earlier cached method gives a value back return the value,
		// otherwise return this to preserve chainability.
		return returns !== undefined ? returns : this;
	}
	return undefined;
}
1194246
public function definition() {
        global $CFG;
        // type of plugin, string
        $this->plugin = $this->_customdata['plugin'];
        $this->typeid = $this->_customdata['typeid'];
        $this->contextid = $this->_customdata['contextid'];
        $this->instance = (isset($this->_customdata['instance'])
                && is_subclass_of($this->_customdata['instance'], 'repository'))
            ? $this->_customdata['instance'] : null;

        $mform =& $this->_form;

        $this->add_defaults();

        // Add instance config options.
        $result = repository::static_function($this->plugin, 'instance_config_form', $mform);
        if ($result === false) {
            // Remove the name element if no other config options.
            $mform->removeElement('name');
        }
        if ($this->instance) {
            $data = array();
            $data['name'] = $this->instance->name;
            if (!$this->instance->readonly) {
                // and set the data if we have some.
                foreach ($this->instance->get_instance_option_names() as $config) {
                    if (!empty($this->instance->options[$config])) {
                        $data[$config] = $this->instance->options[$config];
                     } else {
                        $data[$config] = '';
                     }
                }
            }
            $this->set_data($data);
        }

        if ($result === false) {
            $mform->addElement('cancel');
        } else {
            $this->add_action_buttons(true, get_string('save','repository'));
        }
    }
1364445
function() {
			var topLevelNodes = this._navHandler.getTopLevelNodes();
			for (var i = 0; i < topLevelNodes.length ; i++){
				this.myTree.collapse(topLevelNodes[i]);
			}
		}
882461
function Plugin(option) {
			return this.each(function () {
				var $this = $(this);
				var data = $this.data("bs.dropdown");

				if (!data) $this.data("bs.dropdown", (data = new Dropdown(this)));
				if (typeof option == "string") data[option].call($this);
			});
		}
743693
public void setCollapsed (boolean collapse)
    {
        if (collapse) {
            _content.setVisible(false);
            _trigger.setIcon(_downIcon);

        } else {
            _content.setVisible(true);
            _trigger.setIcon(_upIcon);
        }
        SwingUtil.refresh(this);
    }
183432
function collapse(d) {
    if (d.children) {
      d._children = d.children;
      d._children.forEach(collapse);
      d.children = null;
    }
  }
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);
    }
  };
}
1061332
function () {
            var self = this;
            self.set('expanded', false);
            util.each(self.get('children'), function (c) {
                c.collapseAll();
            });
        }
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;
    });
  };
}
1117124
function Plugin(options) {
    if (this.length) {
      if (options === 'reset') {
        $(document).trigger('resetStart.bui.filterable');
      } else {
        $(document).trigger('filter.bui.filterable');
      }

      this.each(function () {
        var data;
        var $this = $(this);

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

        if (options === 'reset') {
          data.resetFilter();
        } else {
          data.filter(options);
        }
      });

      if (options === 'reset') {
        $(document).trigger('resetEnd.bui.filterable');
      } else {
        $(document).trigger('filtered.bui.filterable');
      }
    }

    return this;
  }
430935
def _collapse_device(self, node, flat):
        """"""
        items = [item
                 for branch in node.branches
                 for item in self._collapse_device(branch, flat)
                 if item]
        show_all = not flat or self._quickmenu_actions == 'all'
        methods = node.methods if show_all else [
            method
            for method in node.methods
            if method.method in self._quickmenu_actions
        ]
        if flat:
            items.extend(methods)
        else:
            items.append(MenuSection(None, methods))
        return items
1370298
private static void collapseIfPossible(FastAdapter fastAdapter) {
        try {
            Class c = Class.forName("com.mikepenz.fastadapter.expandable.ExpandableExtension");
            if (c != null) {
                IAdapterExtension extension = fastAdapter.getExtension(c);
                if (extension != null) {
                    Method method = extension.getClass().getMethod("collapse");
                    method.invoke(extension);
                }
            }
        } catch (Exception ignored) {
            //
        }
    }
985181
function Plugin(element, options) {
    this.element = element;

    this.options = $.extend(true, {}, defaults, options);
    this.options.share = options.share; //simple solution to allow order of buttons

    this._defaults = defaults;
    this._name = pluginName;

    this.init();
  }
1012874
function Plugin(script, _interface, options) {
  this._script = script
  this._options = options || {}
  this._initialInterface = _interface || {}
  this._connect()
}
592790
function plugin( _options ) {
  let options = _options || {};
  return ( files, metalsmith, done ) => {
    let app = new Youtube( options, files );
    app.parse( function() {
      done();
    });
  };
}
490669
function (element, options) {
    this.$element      = $(element)
    this.options       = $.extend({}, Collapse.DEFAULTS, options)
    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
    this.transitioning = null

    if (this.options.parent) {
      this.$parent = this.getParent()
    } else {
      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
    }

    if (this.options.toggle) this.toggle()
  }