Declares the subcomponents for this component.

These are not necessarily child classes, just components this needs.

Further filtering of components based on the build request takes place
here.

@return
An array of subcomponent names and types.
519661
public function requiredComponents() {
    // We add components of type HookImplementation: each of these is a single
    // function. From this point on, these subcomponents are the authority on
    // which hooks we generate. Each HookImplementation component will add the
    // file it requires to the component list.
    $components = array();

    // Just translate the variable for easier frankencoding for now!
    $requested_hook_list = $this->component_data['hooks'];

    // Get a set of hook declarations and function body templates for the hooks
    // we want. This is of the form:
    //   'hook_foo' => array( 'declaration' => DATA, 'template' => DATA )
    $hook_file_data = $this->getTemplates($requested_hook_list);

    // Work over this and add our HookImplentation.
    foreach ($hook_file_data as $filename => $file_hook_list) {
      // If we are set to filter, and the abbreviated filename isn't in the
      // build list, skip it.
      // TODO: this is kinda messy, and assumes that the abbreviated name is
      // always obtained by removing '%module.' from the filename!
      $build_list_key = str_replace('%module.', '', $filename);

      // Add a HookImplementation component for each hook.
      foreach ($file_hook_list as $hook_name => $hook) {
        // Figure out if there is a dedicated generator class for this hook.
        // TODO: is it really worth this faff? How many will we have, apart from
        // hook_menu? Is coding this a) slow and b) YAGNI?
        $hook_name_pieces = explode('_', strtolower($hook['name']));
        $hook_name_pieces = array_map(function($word) { return ucwords($word); }, $hook_name_pieces);
        // Make the class name, eg HookMenu.
        $hook_class_name = implode('', $hook_name_pieces);
        // Make the fully qualified class name.
        $hook_class = $this->classHandlerHelper->getGeneratorClass($hook_class_name);
        if (!class_exists($hook_class)) {
          $hook_class_name = 'HookImplementation';
        }

        $components[$hook['name']] = array(
          'component_type' => $hook_class_name,
          'code_file' => $hook['destination'],
          'hook_name' => $hook['name'],
          'declaration' => $hook['definition'],
          'has_wrapping_newlines' => TRUE,
        );

        // The body for the hook implementation can come either from this
        // component's requester, as the 'hook_bodies' property, or from
        // template  code, or finally, the hook documentation's example code.
        // In the last two cases, the code is in $hook['template'].
        // (Note that further down the line, some specific hook implementation
        // generators assemble body from their own child components.)
        if (isset($this->component_data['hook_bodies'][$hook_name])) {
          $components[$hook_name]['body'] = $this->component_data['hook_bodies'][$hook_name];
        }
        else {
          // Strip out INFO: comments for advanced users.
          // This has to be done before we split this into lines.
          // TODO: No need to do this if this is hook api.php file sample code!
          if (!\DrupalCodeBuilder\Factory::getEnvironment()->getSetting('detail_level', 0)) {
            // Used to strip INFO messages out of generated file for advanced users.
            $pattern = '#\s+/\* INFO:(.*?)\*/#ms';
            $hook['template'] = preg_replace($pattern, '', $hook['template']);
          }

          // This needs to be split into an array of lines for things such as
          // PHPFile::extractFullyQualifiedClasses() to work.
          $hook['template'] = explode("\n", $hook['template']);

          // Trim lines from start and end of body, as hook definitions
          // have newlines at start and end.
          $hook['template'] = array_slice($hook['template'], 1, -1);

          // Set it as the method body.
          $components[$hook['name']]['body'] = $hook['template'];

          // The code is a single string, already indented. Tell
          // buildComponentContents() not to indent it again.
          $components[$hook['name']]['body_indented'] = TRUE;
        }
      }
    }

    return $components;
  }
1001010
public static function list_components() {

        $list['moodle'] = 'core';

        $coresubsystems = core_component::get_core_subsystems();
        ksort($coresubsystems); // should be but just in case
        foreach ($coresubsystems as $name => $location) {
            $list[$name] = 'core_'.$name;
        }

        $plugintypes = core_component::get_plugin_types();
        foreach ($plugintypes as $type => $location) {
            $pluginlist = core_component::get_plugin_list($type);
            foreach ($pluginlist as $name => $ununsed) {
                if ($type == 'mod') {
                    // Plugin names are now automatically validated.
                    $list[$name] = $type.'_'.$name;
                } else {
                    $list[$type.'_'.$name] = $type.'_'.$name;
                }
            }
        }

        return $list;
    }
737933
function getComponents() {
	var results = [];

	if (extensions && extensions.hasOwnProperty('components')) {
		var sourceArray = extensions.components;

		for (index = 0; index < sourceArray.length; ++index) {
		    results.push(sourceArray[index]);
		}
	}

	return results;
}
959660
private function loadComponents()
    {
        if (!$this->componentsloaded) {
            foreach ($this->getSettings()->getComponents() as $componentClass) {
                $component = new $componentClass();
                if ($component instanceof ComponentInterface) {
                    $this->addComponent($component);
                }
            }
            $this->componentsloaded = true;
        }
    }
535307
public ObjectName[] getFilters()
    {
        List l=_webappHandler.getFilters();
        return getComponentMBeans(l.toArray(),_filters);  
    }
815800
public List<PortComponentRefType<ServiceRefType<T>>> getAllPortComponentRef()
   {
      List<PortComponentRefType<ServiceRefType<T>>> list = new ArrayList<PortComponentRefType<ServiceRefType<T>>>();
      List<Node> nodeList = childNode.get("port-component-ref");
      for(Node node: nodeList)
      {
         PortComponentRefType<ServiceRefType<T>>  type = new PortComponentRefTypeImpl<ServiceRefType<T>>(this, "port-component-ref", childNode, node);
         list.add(type);
      }
      return list;
   }
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;
    }
1252079
public FacesConfigComponentType<FacesConfigType<T>> getOrCreateComponent()
   {
      List<Node> nodeList = childNode.get("component");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigComponentTypeImpl<FacesConfigType<T>>(this, "component", childNode, nodeList.get(0));
      }
      return createComponent();
   }
1165274
public Collection<ComponentBuilder> getComponentBuilders() {
        final Collection<ComponentBuilder> result = new ArrayList<>();
        result.addAll(_filterComponentBuilders);
        result.addAll(_transformerComponentBuilders);
        result.addAll(_analyzerComponentBuilders);
        return result;
    }
832949
public function getSearchComponents()
    {
        $searchComponents = [];

        foreach (self::$searchComponents as $componentName => $componentClass) {
            $searchComponents[$componentName] = $this->getSearchComponent($componentName);
        }

        return $searchComponents;
    }
160095
public int[] getSelectedComponents ()
    {
        int[] values = new int[_selected.size()];
        Iterator<Integer> iter = _selected.values().iterator();
        for (int ii = 0; iter.hasNext(); ii++) {
            values[ii] = iter.next().intValue();
        }
        return values;
    }
1232024
public function coreComponents() {
        return [
            'naming' => [
                'class' => '\cza\base\components\utils\Naming',
            ],
            'password' => [
                'class' => '\cza\base\components\utils\Password',
            ],
            'folderOrganizer' => [
                'class' => '\cza\base\components\utils\FolderOrganizer',
                'uploadTempPath' => isset(Yii::$app->params['config']['upload']['tempPath']) ? Yii::$app->params['config']['upload']['tempPath'] : '@app/web/uploads/temp',
                'uploadStorePath' => isset(Yii::$app->params['config']['upload']['storePath']) ? Yii::$app->params['config']['upload']['storePath'] : '@app/web/uploads/store',
            ],
            'wechatHelper' => [
                'class' => '\cza\base\components\utils\WechatHelper',
            ],
            'simpleHTMLDOM' => [
                'class' => '\cza\base\vendor\utils\SimpleHTMLDOM\SimpleHTMLDOM',
            ],
        ];
    }
700851
protected function _loadComponents()
    {
        if (empty($this->components)) {
            return;
        }
        $registry = $this->components();
        $components = $registry->normalizeArray($this->components);
        foreach ($components as $properties) {
            $this->loadComponent($properties['class'], $properties['config']);
        }
    }
1258242
@SuppressWarnings("unchecked")
  public <T> @NonNull Collection<Collection<T>> components() {
    return (Collection<Collection<T>>) this.components;
  }
253900
public function requiredComponents() {
    $components = [];

    // Each RouterItem that gets added will cause a repeat request of these
    // components.
    $components['%module.routing.yml'] = array(
      'component_type' => 'Routing',
    );

    $controller_relative_class = $this->component_data['controller_relative_class_name_pieces'];

    // Add a controller class if needed.
    if (!empty($this->component_data['controller_type']) && $this->component_data['controller_type'] == 'controller') {
      $controller_class_component_name = implode('\\', $controller_relative_class);
      $components[$controller_class_component_name] = array(
        'component_type' => 'PHPClassFile',
        'relative_class_name' => $controller_relative_class,
      );
      $components["{$controller_class_component_name}:content"] = [
        'component_type' => 'PHPFunction',
        'containing_component' => "%requester:{$controller_class_component_name}",
        'declaration' => 'public function content()',
        'doxygen_first' => "Callback for the {$this->component_data['route_name']} route.",
      ];
    }

    if (!empty($this->component_data['menu_link'][0])) {
      // Strip off the module name prefix from the route name to make the plugin
      // name, as the plugin generator will add it back again.
      $plugin_name = $this->component_data['route_name'];
      $plugin_name = substr($plugin_name, strlen($this->component_data['root_component_name']) + 1);

      $components['menu_link'] = array(
        'component_type' => 'PluginYAML',
        'plugin_type' => 'menu.link',
        'plugin_name' => $plugin_name,
        'plugin_properties' => [
          'title' => $this->component_data['menu_link'][0]['title'],
          'route_name' => $this->component_data['route_name'],
        ],
      );
    }

    return $components;
  }
1181798
public static function getDefaultComponentFactories()
    {
        return [
            new Component\ButtonFactory(),
            new Component\CalloutFactory(),
            new Component\CenterFactory(),
            new Component\ColumnsFactory(),
            new Component\ContainerFactory(),
            new Component\ItemFactory(),
            new Component\MenuFactory(),
            new Component\RowFactory(),
            new Component\SpacerFactory(),
            new Component\WrapperFactory(),
        ];
    }
485389
protected function registerComponents()
    {
        ComponentManager::instance()->registerComponents(function ($manager) {
            $manager->registerComponent(\Cms\Components\ViewBag::class, 'viewBag');
            $manager->registerComponent(\Cms\Components\Resources::class, 'resources');
        });
    }