Loading modules/o365_onedrive/o365_onedrive.module +0 −36 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * Onedrive module. */ use Drupal\Core\Form\FormStateInterface; /** * Implements hook_theme(). */ Loading Loading @@ -36,37 +34,3 @@ function o365_onedrive_o365_auth_scopes(array &$scopes) { $scopes[] = 'Files.Read.All'; $scopes[] = 'Files.Read.Selected'; } function o365_onedrive_form_alter(&$form, FormStateInterface $form_state, $form_id) { $config = \Drupal::config('o365.block_settings'); if ($form_id == 'block_settings_form') { // $form['value']['onedrive_block'] = [ $form['block_onedrive'] = [ '#type' => 'textarea', '#title' => t('OneDrive block text'), '#description' => t('Enter the text you would like to show'), '#default_value' => $config->get('block_onedrive'), '#states' => [ 'visible' => [ ':input[name="show_block"]' => ['checked' => TRUE], ], ], ]; } } /** * Implements hook_preprocess(). */ function o365_onedrive_preprocess_page(&$variables) { if (\Drupal::config('o365.block_settings')->get('show_block') == TRUE) { $variables['block_onedrive'] = \Drupal::config('o365.block_settings') ->get('block_onedrive'); } } modules/o365_onedrive/src/Plugin/Block/RecentFilesBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class RecentFilesBlock extends O365UncachedBlockBase implements ContainerFactory $form['show_recent_files_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show recent file\'s when there is no data'), ]; $form['recent_files_block_text'] = [ Loading modules/o365_onedrive/src/Plugin/Block/SharedFilesBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class SharedFilesBlock extends O365UncachedBlockBase implements ContainerFactory $form['show_shared_files_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show shared file\'s when there is no data'), ]; $form['shared_files_block_text'] = [ Loading modules/o365_outlook_mail/src/Plugin/Block/LatestMailBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ class LatestMailBlock extends O365UncachedBlockBase implements ContainerFactoryP $form['show_latest_mail_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show latest mail\'s when there is no data'), ]; $form['latest_mail_block_text'] = [ Loading o365.links.menu.yml +0 −5 Original line number Diff line number Diff line Loading @@ -8,11 +8,6 @@ o365.api_settings_form: route_name: o365.api_settings_form description: 'API settings for the Office 365 Connector module' parent: o365.settings_form o365.block_settings_form: title: 'Block Settings' route_name: o365.block_settings_form description: 'General block settings for the Office 365 Connector module' parent: o365.block_settings_form o365.auth_scopes: title: 'Office 365 scopes' description: 'The needed authorization scopes for correct Office 365 integration' Loading Loading
modules/o365_onedrive/o365_onedrive.module +0 −36 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * Onedrive module. */ use Drupal\Core\Form\FormStateInterface; /** * Implements hook_theme(). */ Loading Loading @@ -36,37 +34,3 @@ function o365_onedrive_o365_auth_scopes(array &$scopes) { $scopes[] = 'Files.Read.All'; $scopes[] = 'Files.Read.Selected'; } function o365_onedrive_form_alter(&$form, FormStateInterface $form_state, $form_id) { $config = \Drupal::config('o365.block_settings'); if ($form_id == 'block_settings_form') { // $form['value']['onedrive_block'] = [ $form['block_onedrive'] = [ '#type' => 'textarea', '#title' => t('OneDrive block text'), '#description' => t('Enter the text you would like to show'), '#default_value' => $config->get('block_onedrive'), '#states' => [ 'visible' => [ ':input[name="show_block"]' => ['checked' => TRUE], ], ], ]; } } /** * Implements hook_preprocess(). */ function o365_onedrive_preprocess_page(&$variables) { if (\Drupal::config('o365.block_settings')->get('show_block') == TRUE) { $variables['block_onedrive'] = \Drupal::config('o365.block_settings') ->get('block_onedrive'); } }
modules/o365_onedrive/src/Plugin/Block/RecentFilesBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class RecentFilesBlock extends O365UncachedBlockBase implements ContainerFactory $form['show_recent_files_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show recent file\'s when there is no data'), ]; $form['recent_files_block_text'] = [ Loading
modules/o365_onedrive/src/Plugin/Block/SharedFilesBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class SharedFilesBlock extends O365UncachedBlockBase implements ContainerFactory $form['show_shared_files_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show shared file\'s when there is no data'), ]; $form['shared_files_block_text'] = [ Loading
modules/o365_outlook_mail/src/Plugin/Block/LatestMailBlock.php +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ class LatestMailBlock extends O365UncachedBlockBase implements ContainerFactoryP $form['show_latest_mail_block'] = [ '#type' => 'checkbox', '#title' => $this->t('Show latest unread mail\'s when there is no data'), '#title' => $this->t('Show latest mail\'s when there is no data'), ]; $form['latest_mail_block_text'] = [ Loading
o365.links.menu.yml +0 −5 Original line number Diff line number Diff line Loading @@ -8,11 +8,6 @@ o365.api_settings_form: route_name: o365.api_settings_form description: 'API settings for the Office 365 Connector module' parent: o365.settings_form o365.block_settings_form: title: 'Block Settings' route_name: o365.block_settings_form description: 'General block settings for the Office 365 Connector module' parent: o365.block_settings_form o365.auth_scopes: title: 'Office 365 scopes' description: 'The needed authorization scopes for correct Office 365 integration' Loading