Commit b4baed28 authored by Fabian de Rijk's avatar Fabian de Rijk
Browse files

Issue #3272948 by Jesse van de Water, BramDriesen, fabianderijk: Blocks with...

Issue #3272948 by Jesse van de Water, BramDriesen, fabianderijk: Blocks with no data are disappearing
parent 7eec7b6c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -120,6 +120,8 @@ class O365LinksBlock extends BlockBase implements ContainerFactoryPluginInterfac
      ];
      return $build;
    }

    return [];
  }

}
+2 −1
Original line number Diff line number Diff line
@@ -86,11 +86,12 @@ class RecentFilesBlock extends O365UncachedBlockBase implements ContainerFactory
   */
  public function blockForm($form, FormStateInterface $form_state) {
    $form = parent::blockForm($form, $form_state);
    $config = $this->getConfiguration();

    $form['show_recent_files_block'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('Show recent files when there is no data'),
      '#default_value' => $config['show_recent_files_block'],
      '#default_value' => ($config['show_recent_files_block']) ?? FALSE,
    ];

    $form['recent_files_block_text'] = [
+2 −1
Original line number Diff line number Diff line
@@ -86,11 +86,12 @@ class SharedFilesBlock extends O365UncachedBlockBase implements ContainerFactory
   */
  public function blockForm($form, FormStateInterface $form_state) {
    $form = parent::blockForm($form, $form_state);
    $config = $this->getConfiguration();

    $form['show_shared_files_block'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('Show shared files when there is no data'),
      '#default_value' => $config['show_shared_files_block'],
      '#default_value' => ($config['show_shared_files_block']) ?? FALSE,
    ];

    $form['shared_files_block_text'] = [
+2 −1
Original line number Diff line number Diff line
@@ -116,11 +116,12 @@ class LatestMailBlock extends O365UncachedBlockBase implements ContainerFactoryP
   */
  public function blockForm($form, FormStateInterface $form_state) {
    $form = parent::blockForm($form, $form_state);
    $config = $this->getConfiguration();

    $form['show_latest_mail_block'] = [
      '#type' => 'checkbox',
      '#title' => $this->t("Show latest mail's when there is no data"),
      '#default_value' => $config['show_latest_mail_block'],
      '#default_value' => ($config['show_latest_mail_block']) ?? FALSE,
    ];

    $form['latest_mail_block_text'] = [
+2 −1
Original line number Diff line number Diff line
@@ -115,11 +115,12 @@ class LatestUnreadMailBlock extends O365UncachedBlockBase implements ContainerFa
   */
  public function blockForm($form, FormStateInterface $form_state) {
    $form = parent::blockForm($form, $form_state);
    $config = $this->getConfiguration();

    $form['show_latest_unread_mail_block'] = [
      '#type' => 'checkbox',
      '#title' => $this->t("Show latest unread mail's when there is no data"),
      '#default_value' => $config['show_latest_unread_mail_block'],
      '#default_value' => ($config['show_latest_unread_mail_block']) ?? FALSE,
    ];

    $form['latest_unread_mail_block_text'] = [