interface WorkspaceDynamicSafeFormInterface

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Form/WorkspaceDynamicSafeFormInterface.php \Drupal\Core\Form\WorkspaceDynamicSafeFormInterface

Defines an interface for forms that can be workspace-safe.

This interface should be used by forms that have to determine whether they're workspace-safe based on dynamic criteria.

Hierarchy

Expanded class hierarchy of WorkspaceDynamicSafeFormInterface

All classes that implement WorkspaceDynamicSafeFormInterface

See also

\Drupal\Core\Form\WorkspaceSafeFormInterface

12 files declare their use of WorkspaceDynamicSafeFormInterface
BulkForm.php in core/modules/views/src/Plugin/views/field/BulkForm.php
ConfigureBlockFormBase.php in core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
ConfigureSectionForm.php in core/modules/layout_builder/src/Form/ConfigureSectionForm.php
DeleteMultipleForm.php in core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php
DiscardLayoutChangesForm.php in core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php

... See full list

File

core/lib/Drupal/Core/Form/WorkspaceDynamicSafeFormInterface.php, line 15

Namespace

Drupal\Core\Form
View source
interface WorkspaceDynamicSafeFormInterface {
    
    /**
     * Determines whether the form is safe to be submitted in a workspace.
     *
     * @param array $form
     *   An associative array containing the structure of the form.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the form.
     *
     * @return bool
     *   TRUE if the form is workspace-safe, FALSE otherwise.
     */
    public function isWorkspaceSafeForm(array $form, FormStateInterface $form_state) : bool;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
WorkspaceDynamicSafeFormInterface::isWorkspaceSafeForm public function Determines whether the form is safe to be submitted in a workspace. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.