Move farm_dashboard to farm_ui_dashboard.

This commit is contained in:
Michael Stenta 2021-06-05 21:26:25 -04:00
parent 69638f33ec
commit 51562201ee
21 changed files with 24 additions and 24 deletions

View File

@ -20,7 +20,6 @@ function farm_modules() {
return [ return [
'base' => [ 'base' => [
'farm_api' => t('farmOS API'), 'farm_api' => t('farmOS API'),
'farm_dashboard' => t('farmOS Dashboard'),
'farm_login' => t('Login with username or email.'), 'farm_login' => t('Login with username or email.'),
'farm_settings' => t('farmOS Settings forms'), 'farm_settings' => t('farmOS Settings forms'),
'farm_ui' => t('farmOS UI'), 'farm_ui' => t('farmOS UI'),

View File

@ -49,8 +49,8 @@ class FarmActions extends DeriverBase {
} }
} }
// Add it to farm.dashboard, if the farm_dashboard module is enabled. // Add it to farm.dashboard, if the farm_ui_dashboard module is enabled.
if (\Drupal::moduleHandler()->moduleExists('farm_dashboard')) { if (\Drupal::moduleHandler()->moduleExists('farm_ui_dashboard')) {
$this->derivatives[$name]['appears_on'][] = 'farm.dashboard'; $this->derivatives[$name]['appears_on'][] = 'farm.dashboard';
} }

View File

@ -2,7 +2,7 @@
/** /**
* @file * @file
* Hooks provided by farm_dashboard. * Hooks provided by farm_ui_dashboard.
* *
* This file contains no working PHP code; it exists to provide additional * This file contains no working PHP code; it exists to provide additional
* documentation for doxygen as well as to document hooks in the standard * documentation for doxygen as well as to document hooks in the standard

View File

@ -2,13 +2,13 @@
/** /**
* @file * @file
* Install, update and uninstall functions for the farm_dashboard module. * Install, update and uninstall functions for the farm_ui_dashboard module.
*/ */
/** /**
* Implements hook_install(). * Implements hook_install().
*/ */
function farm_dashboard_install() { function farm_ui_dashboard_install() {
// Set the front page to /dashboard. // Set the front page to /dashboard.
// We cannot set this with config_rewrite because it breaks the config. See: // We cannot set this with config_rewrite because it breaks the config. See:

View File

@ -1,3 +1,3 @@
farm_dashboard: farm_ui_dashboard:
default_permissions: default_permissions:
- access farm dashboard - access farm dashboard

View File

@ -8,7 +8,7 @@
/** /**
* Implements hook_toolbar_alter(). * Implements hook_toolbar_alter().
*/ */
function farm_dashboard_toolbar_alter(&$items) { function farm_ui_dashboard_toolbar_alter(&$items) {
// Rename home item to "Dashboard". // Rename home item to "Dashboard".
if (!empty($items['home'])) { if (!empty($items['home'])) {

View File

@ -2,6 +2,6 @@ farm.dashboard:
path: '/dashboard' path: '/dashboard'
defaults: defaults:
_title: 'Dashboard' _title: 'Dashboard'
_controller: '\Drupal\farm_dashboard\Controller\DashboardController::dashboard' _controller: '\Drupal\farm_ui_dashboard\Controller\DashboardController::dashboard'
requirements: requirements:
_permission: 'access farm dashboard' _permission: 'access farm dashboard'

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Drupal\farm_dashboard\Controller; namespace Drupal\farm_ui_dashboard\Controller;
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
use Drupal\views\Views; use Drupal\views\Views;

View File

@ -7,6 +7,6 @@ provider: null
plugin: dashboard_test_block plugin: dashboard_test_block
settings: settings:
label: 'Dashboard test block label' label: 'Dashboard test block label'
provider: farm_dashboard_test provider: farm_ui_dashboard_test
label_display: '1' label_display: '1'
visibility: { } visibility: { }

View File

@ -1,7 +1,7 @@
name: Farm Dashboard module tests name: Farm UI Dashboard module tests
description: Support module for dashboard. description: Support module for dashboard.
type: module type: module
package: Testing package: Testing
core_version_requirement: ^9 core_version_requirement: ^9
dependencies: dependencies:
- farm:farm_dashboard - farm:farm_ui_dashboard

View File

@ -2,13 +2,13 @@
/** /**
* @file * @file
* The farm_dashboard_test module. * The farm_ui_dashboard_test module.
*/ */
/** /**
* Implements hook_farm_dashboard_panes(). * Implements hook_farm_dashboard_panes().
*/ */
function farm_dashboard_test_farm_dashboard_panes() { function farm_ui_dashboard_test_farm_dashboard_panes() {
return [ return [
'dashboard_block' => [ 'dashboard_block' => [
'block' => 'dashboard_test', 'block' => 'dashboard_test',

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Drupal\farm_dashboard_test\Plugin\Block; namespace Drupal\farm_ui_dashboard_test\Plugin\Block;
use Drupal\Core\Block\BlockBase; use Drupal\Core\Block\BlockBase;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Drupal\Tests\farm_dashboard\Functional; namespace Drupal\Tests\farm_ui_dashboard\Functional;
use Drupal\Tests\farm\Functional\FarmBrowserTestBase; use Drupal\Tests\farm\Functional\FarmBrowserTestBase;
@ -22,8 +22,8 @@ class DashboardTest extends FarmBrowserTestBase {
* {@inheritdoc} * {@inheritdoc}
*/ */
protected static $modules = [ protected static $modules = [
'farm_dashboard', 'farm_ui_dashboard',
'farm_dashboard_test', 'farm_ui_dashboard_test',
]; ];
/** /**

View File

@ -6,6 +6,7 @@ core_version_requirement: ^9
dependencies: dependencies:
- farm:farm_ui_action - farm:farm_ui_action
- farm:farm_ui_breadcrumb - farm:farm_ui_breadcrumb
- farm:farm_ui_dashboard
- farm:farm_ui_help - farm:farm_ui_help
- farm:farm_ui_map - farm:farm_ui_map
- farm:farm_ui_menu - farm:farm_ui_menu

View File

@ -3,7 +3,7 @@ status: false
dependencies: dependencies:
enforced: enforced:
module: module:
- farm_dashboard - farm_ui_dashboard
module: module:
- farm_map - farm_map
theme: theme:
@ -18,6 +18,6 @@ settings:
id: dashboard_map id: dashboard_map
map_type: dashboard map_type: dashboard
label: 'Dashboard map' label: 'Dashboard map'
provider: farm_dashboard provider: farm_ui_dashboard
label_display: '0' label_display: '0'
visibility: { } visibility: { }

View File

@ -3,7 +3,7 @@ status: true
dependencies: dependencies:
enforced: enforced:
module: module:
- farm_dashboard - farm_ui_dashboard
id: dashboard id: dashboard
label: Dashboard label: Dashboard
description: 'The farmOS dashboard map.' description: 'The farmOS dashboard map.'

View File

@ -5,7 +5,7 @@ package: farmOS UI
core_version_requirement: ^9 core_version_requirement: ^9
dependencies: dependencies:
- farm:asset - farm:asset
- farm:farm_dashboard
- farm:farm_location - farm:farm_location
- farm:farm_map - farm:farm_map
- farm:farm_ui_dashboard
- farm:farm_ui_views - farm:farm_ui_views

View File

@ -38,7 +38,7 @@ class DashboardTasksTest extends FarmBrowserTestBase {
*/ */
protected static $modules = [ protected static $modules = [
'farm_observation', 'farm_observation',
'farm_dashboard', 'farm_ui_dashboard',
'farm_ui_views', 'farm_ui_views',
]; ];