Get all component's manifest.json data.

@param string $componentId [optional] If set, only this component's data
will be returned.
@return array[]
541196
public function componentsManifest($componentId = null)
    {
        $manifest = $this->manifest ?: $this->loadManifest;
        $modules = $manifest['modules'];

        if ($componentId) {
            $modules = array_filter($modules, function ($module) use ($componentId) {
                return $module['id'] === $componentId;
            });
        }

        return $modules;
    }
1028798
public static function getComponentClassInstance(string $componentId)
    {
        if (!isset(self::$componentInstances[$componentId])) {
            $component = self::getComponentWithIdentifier($componentId);
            if (is_null($component)) {
                return null;
            }
            
            self::$componentInstances[$componentId] = $component->getInstance();
        }
        
        return @self::$componentInstances[$componentId];
    }
1078071
protected function get_full_component_list() {
        global $CFG;

        $list = \core_component::get_component_list();
        $list['core']['core'] = "{$CFG->dirroot}/lib";
        $formattedlist = [];
        foreach ($list as $plugintype => $plugin) {
            $formattedlist[] = ['plugin_type' => $plugintype, 'plugins' => array_keys($plugin)];
        }

        return $formattedlist;
    }
1200243
public function get($agentId)
    {
        $menus = $this->http->get(self::API_GET.'?agentid='.$agentId);

        return empty($menus['menu']['button']) ? array() : $menus['menu']['button'];
    }
147569
protected function getCombinesForPackage($packageId)
    {
        $cacheKey = 'packageCombines.'.$packageId;
        $packageCombines = $this->getCachedValue($cacheKey);
        if ($packageCombines === false) {
            $packageCombines = array();

            $data = $this->dataProvider->getData();
            if (isset($data[$packageId])) {
                $info = $data[$packageId];
                if (isset($info['Combines']) && is_array($info['Combines'])) {
                    $packageCombines = $info['Combines'];
                }
            }

            $this->setCachedValue($cacheKey, $packageCombines);
        }

        return $packageCombines;
    }
763241
public static function discoverAll()
    {
        $components = [];

        // Run through all extensions
        foreach (ExtensionManagementUtility::getLoadedExtensionListArray() as $extensionKey) {
            $components = array_merge($components, self::discoverExtensionComponents($extensionKey));
        }

        return $components;
    }
942166
private function getComponentManifest($manifestPath, $componentId)
    {
        $manifest = $this->getManifest($manifestPath);
        $index = $this->getManifestComponentModuleIndex($manifest, $componentId);

        return $manifest['modules'][$index];
    }
79853
public function get($agentid)
    {
        $response = $this->http->get(self::API_GET . '?agentid=' . $agentid);

        return $response;
    }
1343671
protected String getComponentModules(List<String> componentIds) {

        Set<String> comps = new HashSet<String>();
        List<CmsSetupComponent> components = CmsCollectionsGenericWrapper.list(m_components.elementList());
        for (CmsSetupComponent comp : components) {
            if (componentIds.contains(comp.getId())) {
                comps.addAll(getComponentModules(comp));
            }

        }

        StringBuffer buf = new StringBuffer();
        List<String> moduleNames = sortModules(getAvailableModules().values());
        boolean first = true;
        for (String moduleName : moduleNames) {
            if (!first) {
                buf.append("|");
            }
            if (comps.contains(moduleName)) {
                buf.append(moduleName);
            }
            first = false;
        }

        return buf.toString();
    }
865177
protected function getDependsForPackage($packageId)
    {
        $cacheKey = 'packageDepends.'.$packageId;
        $packageDepends = $this->getCachedValue($cacheKey);
        if ($packageDepends === false) {
            $packageDepends = array();

            $data = $this->dataProvider->getData();
            if (isset($data[$packageId])) {
                $info = $data[$packageId];
                if (isset($info['Depends']) && is_array($info['Depends'])) {
                    $packageDepends = $info['Depends'];
                }
            }

            $this->setCachedValue($cacheKey, $packageDepends);
        }

        return $packageDepends;
    }
1036440
public Fields getComponentOutputFields(String componentId, String streamId) {
    Map<String, Fields> componentFields = componentsOutputFields.get(componentId);
    if (componentFields != null) {
      return componentFields.get(streamId);
    }

    return null;
  }
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;
	}
776025
public T get(String componentId) {
		for (T component : components) {
			if (component.getId().equals(componentId)) {
				return component;
			}
		}
		return null;
	}
62343
public static function &getComponents(): array
    {
        if (empty(self::$runtimeComponents)) {
            foreach (self::getAddons() as $addon) {
                self::$runtimeComponents = array_merge(self::$runtimeComponents, $addon->getComponents());
            }
        }
        
        return self::$runtimeComponents;
    }
469858
public function getAllComponents()
    {
        // Answer Cached Components (if available):
        
        if ($this->cacheAllComponents) {
            return $this->cacheAllComponents;
        }
        
        // Obtain Component Objects:
        
        $components = ArrayList::create();
        
        foreach ($this->getAllChildren() as $child) {
            $components->push($child);
            $components->merge($child->getAllComponents());
        }
        
        $this->cacheAllComponents = $components;
        
        // Answer Component Objects:
        
        return $this->cacheAllComponents;
    }
320215
public function componentsVersion($componentId = null)
    {
        $components = $this->components ?: $this->loadComponents();

        array_walk($components, function (&$component) {
            $component = $component['version'];
        });

        return $componentId
            ? [$componentId => $components[$componentId]]
            : $components;
    }
1030439
public function data($buildId)
    {
        $response = new JsonResponse();
        $build = BuildFactory::getBuildById($buildId);

        if (!$build) {
            $response->setResponseCode(404);
            $response->setContent(array());
            return $response;
        }

        $response->setContent($this->getBuildData($build));
        return $response;
    }