Rename farm_client module to farm_fieldkit.

This commit is contained in:
Michael Stenta 2021-12-20 14:18:21 -05:00
parent 72b485e5e2
commit 52e409a125
13 changed files with 20 additions and 20 deletions

View File

@ -56,7 +56,7 @@ function farm_modules() {
'farm_medical' => t('Medical logs'),
'farm_kml' => t('KML export features'),
'farm_import_kml' => t('KML asset importer'),
'farm_client' => t('Field Kit integration'),
'farm_fieldkit' => t('Field Kit integration'),
],
];
}

View File

@ -1,5 +1,5 @@
# Schema for the configuration files of the farm_client module.
farm_client.client_module.*:
# Schema for the configuration files of the farm_fieldkit module.
farm_fieldkit.client_module.*:
type: config_entity
label: 'Client module'
mapping:

View File

@ -1,5 +1,5 @@
name: farmOS Client
description: Integrates the farmOS server and client.
name: farmOS Field Kit
description: Allows Field Kit to connect to this farmOS server.
type: module
package: farmOS
core_version_requirement: ^9

View File

@ -2,7 +2,7 @@
/**
* @file
* Install, update and uninstall function for the farm_client module.
* Install, update and uninstall function for the farm_fieldkit module.
*/
use Drupal\consumers\Entity\Consumer;
@ -10,7 +10,7 @@ use Drupal\consumers\Entity\Consumer;
/**
* Implements hook_install().
*/
function farm_client_install() {
function farm_fieldkit_install() {
// Create a consumer for the farmOS Field Kit client.
$fk_consumer = Consumer::create([
@ -31,7 +31,7 @@ function farm_client_install() {
/**
* Implements hook_uninstall().
*/
function farm_client_uninstall() {
function farm_fieldkit_uninstall() {
// Load the default farm consumer.
$consumers = \Drupal::entityTypeManager()->getStorage('consumer')

View File

@ -1,4 +1,4 @@
farm_client:
farm_fieldkit:
config_permissions:
- administer client_module
default_permissions:

View File

@ -1,7 +1,7 @@
farm_client.client_module_js:
farm_fieldkit.client_module_js:
path: 'farm/client/js/{client_module}/index.js'
defaults:
_controller: '\Drupal\farm_client\Controller\ClientModuleController::index'
_controller: '\Drupal\farm_fieldkit\Controller\ClientModuleController::index'
requirements:
# This endpoint is public.
_access: 'TRUE'

View File

@ -3,8 +3,8 @@ status: true
dependencies:
enforced:
module:
- farm_client_test
- farm_fieldkit_test
id: test
label: Test module
description: Just a client module for testing.
library: farm_client_test/test_client_module
library: farm_fieldkit_test/test_client_module

View File

@ -1,7 +1,7 @@
name: farmOS Client Test
name: farmOS Field Kit Test
description: Test client module.
type: module
package: Testing
core_version_requirement: ^9
dependencies:
- farm:farm_client
- farm:farm_fieldkit

View File

@ -1,10 +1,10 @@
<?php
namespace Drupal\farm_client\Controller;
namespace Drupal\farm_fieldkit\Controller;
use Drupal\Core\Asset\LibraryDiscoveryInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\farm_client\Entity\ClientModuleInterface;
use Drupal\farm_fieldkit\Entity\ClientModuleInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
@ -43,7 +43,7 @@ class ClientModuleController extends ControllerBase {
/**
* Returns the ClientModule JS.
*
* @param \Drupal\farm_client\Entity\ClientModuleInterface $client_module
* @param \Drupal\farm_fieldkit\Entity\ClientModuleInterface $client_module
* The ClientModule config entity.
*
* @return \Symfony\Component\HttpFoundation\Response

View File

@ -1,6 +1,6 @@
<?php
namespace Drupal\farm_client\Entity;
namespace Drupal\farm_fieldkit\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;

View File

@ -1,6 +1,6 @@
<?php
namespace Drupal\farm_client\Entity;
namespace Drupal\farm_fieldkit\Entity;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Entity\EntityDescriptionInterface;