Skip to content

Commit

Permalink
Merge pull request #33 from localgovdrupal/1.x
Browse files Browse the repository at this point in the history
PR ahead of 1.1.0
  • Loading branch information
markconroy committed Dec 13, 2023
2 parents 64ad011 + f283223 commit 2526fbf
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
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
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
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__);
}
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.
*/

0 comments on commit 2526fbf

Please sign in to comment.