Drupal 8  8.0.2
BlockForm Class Reference
Inheritance diagram for BlockForm:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager, ExecutableManagerInterface $manager, ContextRepositoryInterface $context_repository, LanguageManagerInterface $language, ThemeHandlerInterface $theme_handler)
 
 form (array $form, FormStateInterface $form_state)
 
 themeSwitch ($form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 getUniqueMachineName (BlockInterface $block)
 
- Public Member Functions inherited from EntityForm
 setOperation ($operation)
 
 getBaseFormId ()
 
 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 form (array $form, FormStateInterface $form_state)
 
 processForm ($element, FormStateInterface $form_state, $form)
 
 afterBuild (array $element, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
 buildEntity (array $form, FormStateInterface $form_state)
 
 getEntity ()
 
 setEntity (EntityInterface $entity)
 
 getEntityFromRouteMatch (RouteMatchInterface $route_match, $entity_type_id)
 
 getOperation ()
 
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
 setEntityManager (EntityManagerInterface $entity_manager)
 
 setEntityTypeManager (EntityTypeManagerInterface $entity_type_manager)
 
- Public Member Functions inherited from EntityFormInterface
 setStringTranslation (TranslationInterface $string_translation)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Member Functions

 actions (array $form, FormStateInterface $form_state)
 
 validateVisibility (array $form, FormStateInterface $form_state)
 
- Protected Member Functions inherited from EntityForm
 init (FormStateInterface $form_state)
 
 actionsElement (array $form, FormStateInterface $form_state)
 
 actions (array $form, FormStateInterface $form_state)
 
 copyFormValuesToEntity (EntityInterface $entity, array $form, FormStateInterface $form_state)
 
 prepareEntity ()
 
 prepareInvokeAll ($hook, FormStateInterface $form_state)
 

Protected Attributes

 $entity
 
 $storage
 
 $manager
 
 $dispatcher
 
 $language
 
 $themeHandler
 
 $contextRepository
 
- Protected Attributes inherited from EntityForm
 $operation
 
 $moduleHandler
 
 $entityManager
 
 $entityTypeManager
 
 $entity
 

Detailed Description

Provides form for block instance forms.

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager,
ExecutableManagerInterface  $manager,
ContextRepositoryInterface  $context_repository,
LanguageManagerInterface  $language,
ThemeHandlerInterface  $theme_handler 
)

Constructs a BlockForm object.

Parameters
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\Executable\ExecutableManagerInterface$managerThe ConditionManager for building the visibility UI.
\Drupal\Core\Plugin\Context\ContextRepositoryInterface$context_repositoryThe lazy context repository service.
\Drupal\Core\Language\LanguageManagerInterface$languageThe language manager.
\Drupal\Core\Extension\ThemeHandlerInterface$theme_handlerThe theme handler.

References EntityTypeManagerInterface\getStorage().

Here is the call graph for this function:

Member Function Documentation

actions ( array  $form,
FormStateInterface  $form_state 
)
protected

{}

References t().

Here is the call graph for this function:

static create ( ContainerInterface  $container)
static

{}

form ( array  $form,
FormStateInterface  $form_state 
)

{}

References BlockInterface\BLOCK_REGION_NONE, Drupal\config(), BlockForm\getUniqueMachineName(), FormStateInterface\set(), FormStateInterface\setTemporaryValue(), and t().

Here is the call graph for this function:

getUniqueMachineName ( BlockInterface  $block)

Generates a unique machine name for a block.

Parameters
\Drupal\block\BlockInterface$blockThe block entity.
Returns
string Returns the unique name.

References BlockInterface\getPlugin().

Referenced by BlockForm\form().

Here is the call graph for this function:

Here is the caller graph for this function:

submitForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form submission 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 FormStateInterface\get(), Html\getClass(), ContextAwarePluginInterface\getContextDefinitions(), FormStateInterface\getValue(), FormStateInterface\setRedirect(), FormStateInterface\setValue(), and t().

Here is the call graph for this function:

themeSwitch (   $form,
FormStateInterface  $form_state 
)

Handles switching the available regions based on the selected theme.

References FormStateInterface\getValue().

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 FormStateInterface\getValue(), FormStateInterface\setValue(), and BlockForm\validateVisibility().

Here is the call graph for this function:

validateVisibility ( array  $form,
FormStateInterface  $form_state 
)
protected

Helper function to independently validate the visibility UI.

Parameters
array$formA nested array form elements comprising the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.

References FormStateInterface\get(), FormStateInterface\getValue(), and FormStateInterface\setValue().

Referenced by BlockForm\validateForm().

Here is the call graph for this function:

Here is the caller graph for this function:


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