Drupal 8  8.0.2
ModulesListForm Class Reference
Inheritance diagram for ModulesListForm:

Public Member Functions

 __construct (ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, AccessManagerInterface $access_manager, AccountInterface $current_user, PermissionHandlerInterface $permission_handler)
 
 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Member Functions

 buildRow (array $modules, Extension $module, $distribution)
 
 buildModuleList (FormStateInterface $form_state)
 

Protected Attributes

 $currentUser
 
 $moduleHandler
 
 $keyValueExpirable
 
 $moduleInstaller
 
 $permissionHandler
 

Detailed Description

Provides module installation interface.

The list of modules gets populated by module.info.yml files, which contain each module's name, description, and information about which modules it requires. See for info on module.info.yml descriptors.

Constructor & Destructor Documentation

__construct ( ModuleHandlerInterface  $module_handler,
ModuleInstallerInterface  $module_installer,
KeyValueStoreExpirableInterface  $key_value_expirable,
AccessManagerInterface  $access_manager,
AccountInterface  $current_user,
PermissionHandlerInterface  $permission_handler 
)

Constructs a ModulesListForm object.

Parameters
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
\Drupal\Core\Extension\ModuleInstallerInterface$module_installerThe module installer.
\Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface$key_value_expirableThe key value expirable factory.
\Drupal\Core\Access\AccessManagerInterface$access_managerAccess manager.
\Drupal\Core\Session\AccountInterface$current_userThe current user.
\Drupal\user\PermissionHandlerInterface$permission_handlerThe permission handler.

References Drupal\accessManager(), Drupal\currentUser(), Drupal\keyValueExpirable(), and Drupal\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state 
)

{}

References ModulesListForm\buildRow(), Element\children(), Drupal\moduleHandler(), and t().

Here is the call graph for this function:

buildModuleList ( FormStateInterface  $form_state)
protected

Helper function for building a list of modules to install.

Parameters
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
array An array of modules to install and their dependencies.

References Drupal\moduleHandler().

Referenced by ModulesListForm\submitForm().

Here is the call graph for this function:

Here is the caller graph for this function:

buildRow ( array  $modules,
Extension  $module,
  $distribution 
)
protected

Builds a table row for the system modules page.

Parameters
array$modulesThe list existing modules.
\Drupal\Core\Extension\Extension$moduleThe module for which to build the form row.
$distribution
Returns
array The form row for the given module.

References Drupal\accessManager(), Drupal\CORE_COMPATIBILITY, Url\fromRoute(), Drupal\moduleHandler(), t(), and Unicode\ucfirst().

Referenced by ModulesListForm\buildForm().

Here is the call graph for this function:

Here is the caller graph for this function:

static create ( ContainerInterface  $container)
static

{}

getFormId ( )

{}

submitForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

References ModulesListForm\buildModuleList(), Drupal\currentUser(), and Drupal\keyValueExpirable().

Here is the call graph for this function:


The documentation for this class was generated from the following file: