Drupal 8  8.0.2
ConfigSingleImportForm Class Reference
Inheritance diagram for ConfigSingleImportForm:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager, StorageInterface $config_storage, RendererInterface $renderer, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, LockBackendInterface $lock, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler)
 
 getFormId ()
 
 getCancelUrl ()
 
 getQuestion ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ConfirmFormBase
 getDescription ()
 
 getConfirmText ()
 
 getCancelText ()
 
 getFormName ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from FormInterface
 submitForm (array &$form, FormStateInterface $form_state)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Attributes

 $entityManager
 
 $configStorage
 
 $renderer
 
 $eventDispatcher
 
 $configManager
 
 $lock
 
 $typedConfigManager
 
 $moduleHandler
 
 $themeHandler
 
 $moduleInstaller
 
 $configExists = FALSE
 
 $data = array()
 

Detailed Description

Provides a form for importing a single configuration file.

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager,
StorageInterface  $config_storage,
RendererInterface  $renderer,
EventDispatcherInterface  $event_dispatcher,
ConfigManagerInterface  $config_manager,
LockBackendInterface  $lock,
TypedConfigManagerInterface  $typed_config,
ModuleHandlerInterface  $module_handler,
ModuleInstallerInterface  $module_installer,
ThemeHandlerInterface  $theme_handler 
)

Constructs a new ConfigSingleImportForm.

Parameters
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\Config\StorageInterface$config_storageThe config storage.
\Drupal\Core\Render\RendererInterface$rendererThe renderer service.
\Symfony\Component\EventDispatcher\EventDispatcherInterface$event_dispatcherThe event dispatcher used to notify subscribers of config import events.
\Drupal\Core\Config\ConfigManagerInterface$config_managerThe configuration manager.
\Drupal\Core\Lock\LockBackendInterface$lockThe lock backend to ensure multiple imports do not occur at the same time.
\Drupal\Core\Config\TypedConfigManagerInterface$typed_configThe typed configuration manager.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
\Drupal\Core\Extension\ModuleInstallerInterface$module_installerThe module installer.
\Drupal\Core\Extension\ThemeHandlerInterface$theme_handlerThe theme handler.

References Drupal\entityManager(), Drupal\lock(), and Drupal\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
array The form structure.
}

Implements FormInterface.

References Drupal\entityManager(), and t().

Here is the call graph for this function:

static create ( ContainerInterface  $container)
static

{}

getCancelUrl ( )

{Returns the route to go to if the user cancels the action.

Returns
A URL object.
}

Implements ConfirmFormInterface.

getFormId ( )

{Returns a unique string identifying the form.

Returns
string The unique string identifying the form.
}

Implements FormInterface.

getQuestion ( )

{Returns the question to ask the user.

Returns
string The form question. The page title will be set to this value.
}

Implements ConfirmFormInterface.

References Drupal\entityManager(), and t().

Here is the call graph for this function:

validateForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form validation handler.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
}

Implements FormInterface.

References Drupal\config(), Yaml\decode(), Drupal\entityManager(), FormStateInterface\getErrors(), FormStateInterface\getValue(), FormStateInterface\isValueEmpty(), Drupal\lock(), Drupal\moduleHandler(), FormStateInterface\set(), FormStateInterface\setErrorByName(), FormStateInterface\setValueForElement(), and t().

Here is the call graph for this function:


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