Results
07.08.2020
bat 8.x-1.x-dev ::
modules/bat_unit/src/Form/UnitDeleteMultiple.php
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->unitInfo)) {
bat_unit_delete_multiple(array_keys($this->unitInfo));
}
}
} 30.07.2020
bibcite 8.x-1.x-dev ::
modules/bibcite_entity/src/Form/DeleteMultiple.php
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->entityInfo)) {
$storage = $this->entityTypeManager->getStorage($this->entityTypeId);
$entities = $storage->loadMultiple(array_keys($this->entityInfo));
$storage->delete($entities);
$this->logger('bibcite')->notice('Deleted @count references.', ['@count' => count($entities)]); 03.05.2020
broken_link 8.x-3.1 ::
src/Form/BrokenLinkDeleteMultipleForm.php
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->brokenLinkInfo)) {
$total_count = 0;
$delete_brokenLinks = [];
/** @var \Drupal\Core\Entity\ContentEntityInterface[][] $delete_translations */
$delete_translations = [];
/** @var \Drupal\brokenLink\NodeInterface[] $brokenLinks */
$brokenLinks = $this->storage->loadMultiple(array_keys($this->brokenLinkInfo)); 04.01.2018
bulk_edit_terms 8.x-1.1 ::
src/Form/NodeSelectTerms.php
*/
public function submitForm(array &$form, FormStateInterface $form_state): void {
if ($form_state->getValue('confirm') && !empty($this->nodes)) {
$updated_nodes_count = 0;
foreach ($this->nodes as $node) {
assert($node instanceof NodeInterface);
$changes_made_to_node = FALSE;
foreach ($form_state->get('field_names') as $fieldName) {
// Skip if this node doesn't have this field. 03.03.2020
cacheflush 8.x-1.x-dev ::
modules/cacheflush_ui/src/Form/CacheflushDeleteMultiple.php
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->cacheflushInfo)) {
$total_count = 0;
$delete_entities = [];
$delete_translations = [];
$entities = $this->storage->loadMultiple(array_keys($this->cacheflushInfo)); 11.05.2020
content_sync 8.x-2.x-dev ::
src/Form/ContentExportMultiple.php
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->entityList)) {
// Delete the content tar file in case an older version exist.
$this->fileSystem->delete($this->getTempFile());
$entities_list = [];
foreach ($this->entityList as $entity_info) {
$entities_list[] = [ 11.06.2018
custom_meta 8.x-1.0-beta1 ::
src/Form/DeleteForm.php
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $this->config('custom_meta.settings')->get('tag');
if ($form_state->getValue('confirm')) {
unset($values[$this->customMeta['name']]);
$this->configFactory()->getEditable('custom_meta.settings')
->set('tag', $values)
->save();
}
$form_state->setRedirect('custom_meta.admin_overview'); 26.03.2020
deploy_individual 8.x-1.x-dev ::
src/Form/IndividualPushConfirm.php
$this->tempStoreFactory->get('deploy_individual_push_individual')->delete($current_user_id);
if ($form_state->getValue('confirm')) {
// Deploy selected entities.
$selected_entities = $form_state->getValue('entities');
$selected_entities = array_filter($selected_entities);
$organized_uuids = $this->extractUuids($selected_entities);
// Reload entities to put their label in the description of the 21.10.2020
digital_signage_framework 2.3.x-dev ::
src/Form/SchedulePush.php
public function submitForm(array &$form, FormStateInterface $form_state): void {
parent::submitForm($form, $form_state);
if ($form_state->getValue('confirm')) {
$entity_type = NULL;
$entity_id = NULL;
if ($form_state->getValue('singleslidemode')) {
[$entity_type, $entity_id] = explode('/', $form_state->getValue('single_entity'));
}
foreach ($this->devices as $device) { 21.10.2020
digital_signage_framework 2.3.x-dev ::
src/Form/ScheduleConfig.php
public function submitForm(array &$form, FormStateInterface $form_state): void {
parent::submitForm($form, $form_state);
if ($form_state->getValue('confirm')) {
$debugmode = $form_state->getValue('debugmode');
$reloadschedule = $form_state->getValue('reloadschedule');
$reloadassets = $form_state->getValue('reloadassets');
$reloadcontent = $form_state->getValue('reloadcontent');
foreach ($this->devices as $device) {
$this->scheduleManager->pushConfiguration( 21.10.2020
digital_signage_framework 2.3.x-dev ::
src/Form/EmergencyMode.php
public function submitForm(array &$form, FormStateInterface $form_state): void {
parent::submitForm($form, $form_state);
if ($form_state->getValue('confirm')) {
if ($form_state->getValue('emergencymode')) {
[$type, $id] = explode('/', $form_state->getValue('entity'));
/** @var \Drupal\Core\Entity\ContentEntityInterface|null $entity */
$entity = $this->entityTypeManager->getStorage($type)->load($id);
if ($entity) {
$target_id = $entity->get('digital_signage')->getValue()[0]['target_id']; 02.08.2020
entity_update 2.0.x-dev ::
src/Form/EntityUpdateExec.php
$form_state->setErrorByName('about', $this->t("Nothing to update. All entities are up to date."));
}
elseif (!$form_state->getValue('confirm')) {
$form_state->setErrorByName('confirm', $this->t("If you want to execute, please check the checkbox."));
}
}
/**
* Safe mode validation. 17.10.2020
farm 2.x-dev ::
modules/asset/group/src/Form/AssetGroupActionForm.php
// Create an observation log to group the assets.
if ($form_state->getValue('confirm') && !empty($accessible_entities)) {
// Load group assets.
$groups = [];
$group_ids = array_column($form_state->getValue('group', []) ?? [], 'target_id');
if (!empty($group_ids)) {
$groups = $this->entityTypeManager->getStorage('asset')->loadMultiple($group_ids); 17.10.2020
farm 2.x-dev ::
modules/core/log/src/Form/AssetAddLogActionForm.php
// Default redirect url.
$redirect_url = $this->getCancelUrl();
if (!empty($form_state->getValue('confirm')) && !empty($accessible_entities)) {
$log_type = $form_state->getValue('log_type');
if (!empty($log_type)) {
// If a destination query param is set, save it and remove it.
// First we need to redirect to the /log/add/{log_type} form. 17.10.2020
farm 2.x-dev ::
modules/core/location/src/Form/AssetMoveActionForm.php
// Create an activity log to move the assets.
if ($form_state->getValue('confirm') && !empty($accessible_entities)) {
// Load location assets.
$locations = [];
$location_ids = array_column($form_state->getValue('location', []) ?? [], 'target_id');
if (!empty($location_ids)) {
$locations = $this->entityTypeManager->getStorage('asset')->loadMultiple($location_ids); 12.12.2021
farm_project_plan 1.x-dev ::
src/Form/ProjectAddLogActionForm.php
// Create an observation log to group the assets.
if ($form_state->getValue('confirm') && !empty($accessible_entities)) {
$project_id = $form_state->getValue('project');
$project = Plan::load($project_id);
if (empty($project)) {
$this->messenger()->addWarning($this->t('Could not load project.'));
} 07.03.2020
file_entity 8.x-2.x-dev ::
src/Form/FileDeleteMultipleForm.php
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->files)) {
$this->storage->delete($this->files);
$this->tempStore->delete('delete');
}
$form_state->setRedirect('entity.file.collection');
} 09.01.2020
fortnox 8.x-1.x-dev ::
src/Form/DeleteResource.php
$parameters = $this->getRouteMatch()->getRawParameters();
$queryParameters = $this->requestStack->getCurrentRequest()->query->all();
if ($form_state->getValue('confirm') == 1) {
try {
$plugin = $this->resourceManager->createInstance($parameters->get('resource'));
if (is_object($plugin)) {
$param1 = !empty($queryParameters['param1']) ? $queryParameters['param1'] : '';
$param2 = !empty($queryParameters['param2']) ? $queryParameters['param2'] : '';
$response = $plugin->deleteResource($parameters->get('id'), $param1, $param2); 16.11.2018
httpbl 8.x-1.x-dev ::
src/Form/HostMultipleBanConfirm.php
$banningEnabled = TRUE ? \Drupal::state()->get('httpbl.storage') == HTTPBL_DB_HH_DRUPAL : $banningEnabled = FALSE;
if ($form_state->getValue('confirm') && !empty($this->hostInfo)) {
$ban_hosts = [];
$blacklist_hosts = [];
/** @var \Drupal\httpbl\HostInterface[] $hosts */
$hosts = $this->storage->loadMultiple(array_keys($this->hostInfo));
foreach ($this->hostInfo as $id => $host_ips) { 16.11.2018
httpbl 8.x-1.x-dev ::
src/Form/HostMultipleGreylistConfirm.php
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('confirm') && !empty($this->hostInfo)) {
$greylist_hosts = [];
$unban_hosts = [];
/** @var \Drupal\httpbl\HostInterface[] $hosts */
$hosts = $this->storage->loadMultiple(array_keys($this->hostInfo));
foreach ($this->hostInfo as $id => $host_ips) { 