original_string: public function listFormWidgets()
      {
          if ($this->formWidgets === null) {
              $this->formWidgets = [];
  
              /*
               * Load module widgets
               */
              foreach ($this->formWidgetCallbacks as $callback) {
                  $callback($this);
              }
  
              /*
               * Load plugin widgets
               */
              $plugins = $this->pluginManager->getPlugins();
  
              foreach ($plugins as $plugin) {
                  if (!is_array($widgets = $plugin->registerFormWidgets())) {
                      continue;
                  }
  
                  foreach ($widgets as $className => $widgetInfo) {
                      $this->registerFormWidget($className, $widgetInfo);
                  }
              }
          }
  
          return $this->formWidgets;
      }
code: public function listFormWidgets()
      {
          if ($this->formWidgets === null) {
              $this->formWidgets = [];
  
              /*
               * Load module widgets
               */
              foreach ($this->formWidgetCallbacks as $callback) {
                  $callback($this);
              }
  
              /*
               * Load plugin widgets
               */
              $plugins = $this->pluginManager->getPlugins();
  
              foreach ($plugins as $plugin) {
                  if (!is_array($widgets = $plugin->registerFormWidgets())) {
                      continue;
                  }
  
                  foreach ($widgets as $className => $widgetInfo) {
                      $this->registerFormWidget($className, $widgetInfo);
                  }
              }
          }
  
          return $this->formWidgets;
      }
code_tokens: public function listFormWidgets ( ) { if ( $ this -> formWidgets === null ) { $ this -> formWidgets = [ ] ; /*
               * Load module widgets
               */ foreach ( $ this -> formWidgetCallbacks as $ callback ) { $ callback ( $ this ) ; } /*
               * Load plugin widgets
               */ $ plugins = $ this -> pluginManager -> getPlugins ( ) ; foreach ( $ plugins as $ plugin ) { if ( ! is_array ( $ widgets = $ plugin -> registerFormWidgets ( ) ) ) { continue ; } foreach ( $ widgets as $ className => $ widgetInfo ) { $ this -> registerFormWidget ( $ className , $ widgetInfo ) ; } } } return $ this -> formWidgets ; }
docstring: Returns a list of registered form widgets.
  @return array Array keys are class names.
docstring_tokens: Returns a list of registered form widgets .