1

In my custom entity module I have already defined a status checkbox to determine the entities status. What I noticed is when I enable show_revisions_ui in the annotation and have the entity setup to support multiple languages there are two check boxes at the bottom of the page.

One of them is to publish this entities language copy and as a result the published checkbox I created is being ignored. How can I disable the multilingual published checkbox?

enter image description here

  • 1
    Have you tried hook_form_alter already? – leymannx Dec 18 '19 at 16:42
  • I checked but only the revisions field had a group labeled advanced. Not sure where that field is coming from. – blu Dec 18 '19 at 18:07
2

So it turns out I needed to define a translation handler for my entity.

inside of MyEntityTranslationHandler that extends the ContentTranslationHandler I override the entityFormAlter function and add this:

$form['content_translation']['status']['#access'] = FALSE;

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.