Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
o365
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
o365
Commits
94fb05c9
Commit
94fb05c9
authored
4 months ago
by
Fabian de Rijk
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3390096
: Group translation fails
parent
2754b1cc
No related branches found
No related tags found
No related merge requests found
Pipeline
#313655
failed
4 months ago
Stage: build
Stage: validate
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/o365_groups/o365_groups.install
+10
-0
10 additions, 0 deletions
modules/o365_groups/o365_groups.install
modules/o365_groups/o365_groups.module
+0
-36
0 additions, 36 deletions
modules/o365_groups/o365_groups.module
with
10 additions
and
36 deletions
modules/o365_groups/o365_groups.install
+
10
−
0
View file @
94fb05c9
...
...
@@ -83,6 +83,16 @@ function o365_groups_update_9005() {
->
installFieldStorageDefinition
(
'field_o365_groups_teams_id'
,
'group'
,
'o365_groups'
,
$groupField
);
}
/**
* Remove groups field_o365_groups_teams_id field.
*/
function
o365_groups_update_9006
()
{
$update_manager
=
Drupal
::
service
(
'entity.definition_update_manager'
);
$definition
=
$update_manager
->
getFieldStorageDefinition
(
'field_o365_groups_teams_id'
,
'group'
);
$update_manager
->
uninstallFieldStorageDefinition
(
$definition
);
return
t
(
'Entity: field_o365_groups_teams_id was uninstalled'
);
}
/**
* Implements hook_schema().
*/
...
...
This diff is collapsed.
Click to expand it.
modules/o365_groups/o365_groups.module
+
0
−
36
View file @
94fb05c9
...
...
@@ -46,42 +46,6 @@ function o365_groups_entity_extra_field_info() {
return
$extra
;
}
/**
* Implements hook_entity_base_field_info().
*/
function
o365_groups_entity_base_field_info
(
EntityTypeInterface
$entity_type
)
{
$fields
=
[];
if
(
$entity_type
->
id
()
===
'group'
)
{
// This field needs to be removed in the next major release.
$fields
[
'field_o365_groups_teams_id'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Connected Microsoft 365 group'
))
->
setRevisionable
(
TRUE
)
->
setTranslatable
(
FALSE
)
->
setDisplayOptions
(
'form'
,
[
'type'
=>
'select'
,
'weight'
=>
30
,
])
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setRequired
(
FALSE
)
->
setTranslatable
(
TRUE
)
->
setStorageRequired
(
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
)
->
setComputed
(
FALSE
);
}
return
$fields
;
}
/**
* Implements hook_form_BASE_FORM_ID_alter().
*/
function
o365_groups_form_group_form_alter
(
&
$form
,
FormStateInterface
$form_state
,
$form_id
)
{
// We need to hide this field in favor of the new field created.
// This field needs to be removed in the next major release.
if
(
isset
(
$form
[
'field_o365_groups_teams_id'
]))
{
$form
[
'field_o365_groups_teams_id'
][
'#access'
]
=
FALSE
;
}
}
/**
* Implements hook_ENTITY_TYPE_view().
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment