-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from localgovdrupal/1.x
PR ahead of 1.1.0
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...notices/config/optional/language.content_settings.node.localgov_planning_notices_list.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- node.type.localgov_planning_notices_list | ||
module: | ||
- content_translation | ||
third_party_settings: | ||
content_translation: | ||
enabled: true | ||
bundle_settings: | ||
untranslatable_fields_hide: '0' | ||
id: node.localgov_planning_notices_list | ||
target_entity_type_id: node | ||
target_bundle: localgov_planning_notices_list | ||
default_langcode: site_default | ||
language_alterable: true |
8 changes: 8 additions & 0 deletions
8
...multilingual_irish_planning_notices/localgov_multilingual_irish_planning_notices.info.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: "Localgov Multilingual: Irish Planning Notices" | ||
type: module | ||
description: Add multilingual capabilities to the Irish Planning Notices content type. | ||
package: LocalGov Drupal | ||
core_version_requirement: ^9 || ^10 | ||
dependencies: | ||
- localgovdrupal:localgov_irish_planning_notices | ||
- localgovdrupal:localgov_multilingual |
39 changes: 39 additions & 0 deletions
39
..._multilingual_irish_planning_notices/localgov_multilingual_irish_planning_notices.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Install, update and uninstall functions for LGD Multilingual: Planning. | ||
*/ | ||
|
||
/** | ||
* Implements hook_install(). | ||
*/ | ||
function localgov_multilingual_irish_planning_notices_install($is_syncing) { | ||
|
||
if ($is_syncing) { | ||
return; | ||
} | ||
|
||
$config_factory = \Drupal::configFactory(); | ||
|
||
$node_irish_planning_notices_fields = [ | ||
'localgov_pnl_date', | ||
'localgov_pnl_files', | ||
'localgov_pnl_week_number', | ||
'localgov_pnl_year', | ||
]; | ||
|
||
// Set node fields to be translatable. | ||
foreach ($node_irish_planning_notices_fields as $field) { | ||
$config = $config_factory->getEditable('field.field.node.localgov_planning_notices_list.' . $field); | ||
$config->set('translatable', TRUE); | ||
$config->save(TRUE); | ||
} | ||
} | ||
|
||
/** | ||
* Implements hook_uninstall(). | ||
*/ | ||
function localgov_multilingual_irish_planning_notices_uninstall() { | ||
\Drupal::messenger()->addStatus(__FUNCTION__); | ||
} |
6 changes: 6 additions & 0 deletions
6
...v_multilingual_irish_planning_notices/localgov_multilingual_irish_planning_notices.module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Primary module hooks for Localgov Multilingual: Irish Planning Notices. | ||
*/ |