Get list of components available

@since 2.0.0
161097
public function get_components() {

		$components = pods_transient_get( 'pods_components' );

		if ( 1 === (int) pods_v( 'pods_debug_components', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
			$components = array();
		}

		if ( PODS_VERSION !== PodsInit::$version || ! is_array( $components ) || empty( $components ) || ( is_admin() && 'pods-components' === pods_v( 'page' ) && 1 !== (int) pods_transient_get( 'pods_components_refresh' ) ) ) {
			do_action( 'pods_components_get' );

			// @codingStandardsIgnoreLine
			$component_dir   = @opendir( untrailingslashit( $this->components_dir ) );
			$component_files = array();

			if ( false !== $component_dir ) {
				$file = readdir( $component_dir );

				while ( false !== $file ) {
					if ( '.' === substr( $file, 0, 1 ) ) {
						// Get next file
						$file = readdir( $component_dir );

						continue;
					} elseif ( is_dir( $this->components_dir . $file ) ) {
						// @codingStandardsIgnoreLine
						$component_subdir = @opendir( $this->components_dir . $file );

						if ( $component_subdir ) {
							$subfile = readdir( $component_subdir );

							while ( false !== $subfile ) {
								if ( '.' === substr( $subfile, 0, 1 ) ) {
									// Get next file
									$subfile = readdir( $component_subdir );

									continue;
								} elseif ( '.php' === substr( $subfile, - 4 ) ) {
									$component_files[] = str_replace( '\\', '/', $file . '/' . $subfile );
								}

								// Get next file
								$subfile = readdir( $component_subdir );
							}

							closedir( $component_subdir );
						}
					} elseif ( '.php' === substr( $file, - 4 ) ) {
						$component_files[] = $file;
					}//end if

					// Get next file
					$file = readdir( $component_dir );
				}//end while

				closedir( $component_dir );
			}//end if

			$default_headers = array(
				'ID'               => 'ID',
				'Name'             => 'Name',
				'ShortName'        => 'Short Name',
				'PluginName'       => 'Plugin Name',
				'ComponentName'    => 'Component Name',
				'URI'              => 'URI',
				'MenuName'         => 'Menu Name',
				'MenuPage'         => 'Menu Page',
				'MenuAddPage'      => 'Menu Add Page',
				'MustUse'          => 'Must Use',
				'Description'      => 'Description',
				'Version'          => 'Version',
				'Category'         => 'Category',
				'Author'           => 'Author',
				'AuthorURI'        => 'Author URI',
				'Class'            => 'Class',
				'Hide'             => 'Hide',
				'PluginDependency' => 'Plugin Dependency',
				'ThemeDependency'  => 'Theme Dependency',
				'DeveloperMode'    => 'Developer Mode',
				'TablelessMode'    => 'Tableless Mode',
				'Capability'       => 'Capability',
				'Plugin'           => 'Plugin',
			);

			$component_files = apply_filters( 'pods_components_register', $component_files );

			$components = array();

			foreach ( $component_files as $component_file ) {
				$external = false;

				if ( is_array( $component_file ) && isset( $component_file['File'] ) ) {
					$component_file = $component_file['File'];
					$component      = $component_file;

					$external = true;
				} else {
					$component = $this->components_dir . $component_file;
				}

				if ( ! is_readable( $component ) ) {
					continue;
				}

				$component_data = get_file_data( $component, $default_headers, 'pods_component' );

				if ( ( empty( $component_data['Name'] ) && empty( $component_data['ComponentName'] ) && empty( $component_data['PluginName'] ) ) || 'yes' === $component_data['Hide'] ) {
					continue;
				}

				if ( isset( $component_data['Plugin'] ) && pods_is_plugin_active( $component_data['Plugin'] ) ) {
					continue;
				}

				if ( empty( $component_data['Name'] ) ) {
					if ( ! empty( $component_data['ComponentName'] ) ) {
						$component_data['Name'] = $component_data['ComponentName'];
					} elseif ( ! empty( $component_data['PluginName'] ) ) {
						$component_data['Name'] = $component_data['PluginName'];
					}
				}

				if ( empty( $component_data['ShortName'] ) ) {
					$component_data['ShortName'] = $component_data['Name'];
				}

				if ( empty( $component_data['MenuName'] ) ) {
					$component_data['MenuName'] = $component_data['Name'];
				}

				if ( empty( $component_data['Class'] ) ) {
					$component_data['Class'] = 'Pods_' . pods_js_name( basename( $component, '.php' ), false );
				}

				if ( empty( $component_data['ID'] ) ) {
					$component_data['ID'] = $component_data['Name'];
				}

				$component_data['ID'] = sanitize_title( $component_data['ID'] );

				if ( 'on' === strtolower( $component_data['DeveloperMode'] ) && '1' === $component_data['DeveloperMode'] ) {
					$component_data['DeveloperMode'] = true;
				} else {
					$component_data['DeveloperMode'] = false;
				}

				if ( 'on' === strtolower( $component_data['TablelessMode'] ) && '1' === $component_data['TablelessMode'] ) {
					$component_data['TablelessMode'] = true;
				} else {
					$component_data['TablelessMode'] = false;
				}

				$component_data['External'] = $external;

				if ( 'on' === strtolower( $component_data['MustUse'] ) || '1' === $component_data['MustUse'] ) {
					$component_data['MustUse'] = true;
				} elseif ( 'off' === strtolower( $component_data['MustUse'] ) || '0' === $component_data['MustUse'] ) {
					$component_data['MustUse'] = false;
				} else {
					$component_data['MustUse'] = $component_data['External'];
				}

				$component_data['File'] = $component_file;

				$components[ $component_data['ID'] ] = $component_data;
			}//end foreach

			ksort( $components );

			pods_transient_set( 'pods_components_refresh', 1, ( 60 * 60 * 12 ) );

			pods_transient_set( 'pods_components', $components );
		}//end if

		if ( 1 === (int) pods_v( 'pods_debug_components', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
			pods_debug( $components );
		}

		$this->components = $components;

		return $this->components;
	}
1250887
function getComponents(templateSrc, filename, options){
  var $ = cheerio.load('<div>' + templateSrc + '</div>');
  var components = [];

  var nodeIndex = 0;

  $('*').contents().map(function(index, $el) {
  
    if ($el.type === 'comment') {
      var src = $el.data.trim();

      // keyword check
      if(isComponentComment(src, options.keyword)){
        src = src.substring(options.keyword.length);
        var meta = YAML.safeLoad(src) || {};
        
        var nodes = getComponentHtml($, $el, $.html($($el).nextAll()), options.keyword, meta);
        var html = nodes.filter(function(node) { 
          return (node.trim() !== '');
        }).join('\n');

        var output = render(html, meta, options.block);

        var component = {
          meta: meta,
          file: filename,
          output: output.trim()
        };

        // push comment
        return components.push(component);
      }
    }
  }.bind(this));

  return components;
}
392123
public function getListItemButtons()
    {
        $buttons = ArrayList::create();
        
        foreach ($this->owner->getListItemButtonsConfig() as $name => $spec) {
            
            if ($spec) {
                
                foreach ($spec as $item => $value) {
                    
                    $args = [];
                    
                    if (is_array($value)) {
                        $args  = $value;
                        $value = array_shift($args);
                    }
                    
                    $spec[$item] = $this->processListItemValue($value, $args);
                    
                }
                
                if (isset($spec['show']) && !$this->owner->{$spec['show']}) {
                    continue;
                }
                
                $href = isset($spec['href']) ? $spec['href'] : null;
                
                $type  = null;
                $extra = null;
                
                if ($renderer = $this->owner->getRenderer()) {
                    $type  = $renderer->ButtonTypeStyle;
                    $extra = $renderer->ButtonExtraClass;
                }
                
                if ($href) {
                    
                    $buttons->push(
                        ArrayData::create([
                            'Icon' => isset($spec['icon']) ? $spec['icon'] : null,
                            'Type' => isset($spec['type']) ? $spec['type'] : $type,
                            'HREF' => isset($spec['href']) ? $spec['href'] : null,
                            'Text' => isset($spec['text']) ? $spec['text'] : null,
                            'ExtraClass' => isset($spec['extraClass']) ? $spec['extraClass'] : $extra
                        ])
                    );
                    
                }
                
            }
            
        }
        
        return $buttons;
    }
349043
public function getEnabledComponents()
    {
        // Create Components List:
        
        $components = ArrayList::create();
        
        // Merge Template Components:
        
        if ($template = $this->getPageTemplate()) {
            $components->merge($template->getEnabledComponents());
        }
        
        // Merge Layout Components:
        
        if ($layout = $this->getPageLayout()) {
            $components->merge($layout->getEnabledComponents());
        }
        
        // Answer Components List:
        
        return $components;
    }
1260315
public List<ICalComponent> getComponents(T component) {
		return new ArrayList<ICalComponent>(component.getComponents().values());
	}
609315
private List<String> getImportComponents( Component component ) {

		List<String> result = new ArrayList<> ();
		Map<String,Boolean> map = ComponentHelpers.findComponentDependenciesFor( component );
		for( Map.Entry<String,Boolean> entry : map.entrySet()) {
			String s = applyLink( entry.getKey(), entry.getKey());
			s += entry.getValue() ? this.messages.get( "optional" ) : this.messages.get( "required" ); //$NON-NLS-1$ //$NON-NLS-2$
			result.add( s );
		}

		return result;
	}
303506
public function listComponentDetails()
    {
        if ($this->detailsCache !== null) {
            return $this->detailsCache;
        }

        $details = [];
        foreach ($this->listComponents() as $componentAlias => $componentClass) {
            $details[$componentAlias] = $this->makeComponent($componentClass)->componentDetails();
        }

        return $this->detailsCache = $details;
    }
419055
public function getSubComponents() {
    $base_path = $this->getBaseComponentPath();

    $filter = function (Extension $module) use ($base_path) {
      return strlen(dirname($module->getPath())) > strlen($base_path);
    };

    return array_filter($this->getAll(), $filter);
  }
1142288
public static function available_evaluators_list() {
        $evals = array();
        foreach (core_component::get_plugin_list_with_file('workshopeval', 'lib.php', false) as $eval => $evalpath) {
            $evals[$eval] = get_string('pluginname', 'workshopeval_' . $eval);
        }
        return $evals;
    }
1085412
public function getComponents()
    {
        $components = [
            'Base'                          => 'GetOlympus\Zeus\Base\Controller\Base',
            'BaseWidget'                    => 'GetOlympus\Zeus\Base\Controller\BaseWidget',
            'Helpers'                       => 'GetOlympus\Zeus\Helpers\Controller\Helpers',

            'AdminPage'                     => 'GetOlympus\Zeus\AdminPage\Controller\AdminPage',
            'Ajax'                          => 'GetOlympus\Zeus\Ajax\Controller\Ajax',
            'Configuration'                 => 'GetOlympus\Zeus\Configuration\Controller\Configuration',
            'Cron'                          => 'GetOlympus\Zeus\Cron\Controller\Cron',
            'Error'                         => 'GetOlympus\Zeus\Error\Controller\Error',
            'Field'                         => 'GetOlympus\Zeus\Field\Controller\Field',
            'Hook'                          => 'GetOlympus\Zeus\Hook\Controller\Hook',
            'Metabox'                       => 'GetOlympus\Zeus\Metabox\Controller\Metabox',
            'Option'                        => 'GetOlympus\Zeus\Option\Controller\Option',
            'Posttype'                      => 'GetOlympus\Zeus\Posttype\Controller\Posttype',
            'PosttypeHook'                  => 'GetOlympus\Zeus\Posttype\Controller\PosttypeHook',
            'Render'                        => 'GetOlympus\Zeus\Render\Controller\Render',
            'Request'                       => 'GetOlympus\Zeus\Request\Controller\Request',
            'Template'                      => 'GetOlympus\Zeus\Template\Controller\Template',
            'Term'                          => 'GetOlympus\Zeus\Term\Controller\Term',
            'TermHook'                      => 'GetOlympus\Zeus\Term\Controller\TermHook',
            'Translate'                     => 'GetOlympus\Zeus\Translate\Controller\Translate',
            'WalkerSingle'                  => 'GetOlympus\Zeus\WalkerSingle\Controller\WalkerSingle',
            'Widget'                        => 'GetOlympus\Zeus\Widget\Controller\Widget',
        ];

        // Iterate on externals
        foreach ($this->externals as $shortname => $classname) {
            $components[$shortname] = $classname;
        }

        return $components;
    }
350417
public Collection<PluginComponent> list(List<String> queryParams)
    {
        return HTTP.GET("/v2/components.json", null, queryParams, PLUGIN_COMPONENTS).get();
    }
998905
function getComponents(nextState, callback) {
  mapAsync(nextState.routes, function (route, index, callback) {
    getComponentsForRoute(nextState, route, callback)
  }, callback)
}
89237
def getComponentList(self):
        '''
        
        '''

        component_list = []

        for x in self.discountcombocomponent_set.all():
            for y in range(0,x.quantity):
                component_list += [x]

        component_list.sort(key=lambda x: x.quantity, reverse=True)
        return component_list
1087883
public function loadComponents()
    {
        foreach(Config::get('@' . $this->moduleName . '.components', []) as $componentName => $namespace)
        {
            Helper::getMain($namespace, $componentName);
        }
    }
102633
def get_released_versions(component):
    

    releases = get_tags()
    releases = sorted([(x[0], [int(y) for y in x[1].split('.')]) for x in releases], key=lambda x: x[1])[::-1]

    return [(x[0], ".".join(map(str, x[1]))) for x in releases if x[0] == component]
1121556
public function getComponents($component = null)
    {
        if (is_null($component)) {
            return $this->components;
        }

        $this->validateComponentExists($component);

        return $this->components[$component];
    }
922277
function getNewComponents(components, registry) {
    var componentNameHelper = {};
    components.forEach(function (component) { return (componentNameHelper[component._componentName] = true); });
    var componentNames = Object.keys(componentNameHelper);
    return componentNames.filter(function (componentName) { return !registry._activeComponents[componentName]; });
}