Loading src/Form/BlocksSyncForm.php +10 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\structure_sync\Form; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfigFormBase; Loading Loading @@ -87,8 +88,15 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]; $blockList = []; $blocks = $this->entityTypeManager->getStorage('block_content') try { $blocks = $this->entityTypeManager ->getStorage('block_content') ->loadMultiple(); } catch (PluginNotFoundException $e) { $blocks = []; } foreach ($blocks as $block) { $blockList[$block->uuid()] = $block->info->getValue()[0]['value']; } Loading Loading
src/Form/BlocksSyncForm.php +10 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\structure_sync\Form; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfigFormBase; Loading Loading @@ -87,8 +88,15 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]; $blockList = []; $blocks = $this->entityTypeManager->getStorage('block_content') try { $blocks = $this->entityTypeManager ->getStorage('block_content') ->loadMultiple(); } catch (PluginNotFoundException $e) { $blocks = []; } foreach ($blocks as $block) { $blockList[$block->uuid()] = $block->info->getValue()[0]['value']; } Loading