首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >中的“上次保存”和“作者”字段

中的“上次保存”和“作者”字段
EN

Drupal用户
提问于 2018-09-11 07:13:09
回答 1查看 797关注 0票数 0

如何删除Drupal 8中的“最后保存”和“作者”字段?

这里的回答对如何删除创作信息?没有帮助

我试过通过form_alter把它藏起来,但是没有运气.

我很感谢你的帮助和建议.已经在这件事上浪费了很多时间。

我在kint($form)中得到的部分内容;如果这可以帮助您的话:

代码语言:javascript
复制
→'meta' => array(10)

'#type' => string(7) "details"

'#group' => string(8) "advanced"

'#weight' => integer-10

→'#title' => Drupal\Core\StringTranslation\TranslatableMarkup(5)

        contents Available methods (14) 

        protected translatedMarkup -> NULL

        protected options -> array(0)

        →protected stringTranslation -> Drupal\Core\StringTranslation\TranslationManager(4)
                contents Available methods (10) 

                →protected translators -> array(2)

                    →'30' => array(1)

                        *DEPTH TOO GREAT*

                    →'0' => array(1)

                        *DEPTH TOO GREAT*

                →protected sortedTranslators -> array(2)

                    →Drupal\Core\StringTranslation\Translator\CustomStrings(4)

                        *DEPTH TOO GREAT*

                    →Drupal\locale\LocaleTranslation(9)

                        *DEPTH TOO GREAT*

                protected defaultLangcode -> string(2) "en"

                public _serviceId -> string(18) "string_translation"

        protected string -> string(6) "Status"

        protected arguments -> array(0) 

→'#attributes' => array(1)

    →'class' => array(1)

        string(19) "entity-meta__header"

'#tree' => boolTRUE

'#access' => boolTRUE

→'published' => array(4)

    '#type' => string(4) "item"

    →'#markup' => Drupal\Core\StringTranslation\TranslatableMarkup(5)

            contents Available methods (14) 

            protected translatedMarkup -> NULL

            protected options -> array(0)

            →protected stringTranslation -> Drupal\Core\StringTranslation\TranslationManager(4)
                    contents Available methods (10) 

                    →protected translators -> array(2)

                        *DEPTH TOO GREAT*

                    →protected sortedTranslators -> array(2)

                        *DEPTH TOO GREAT*

                    protected defaultLangcode -> string(2) "en"

                    public _serviceId -> string(18) "string_translation"

            protected string -> string(9) "Published"

            protected arguments -> array(0) 

    '#access' => boolFALSE

    →'#wrapper_attributes' => array(1)

        →'class' => array(1)

            string(18) "entity-meta__title"

→'changed' => array(4)

    '#type' => string(4) "item"

    →'#title' => Drupal\Core\StringTranslation\TranslatableMarkup(5)

            contents Available methods (14) 

            protected translatedMarkup -> NULL

            protected options -> array(0)

            →protected stringTranslation -> Drupal\Core\StringTranslation\TranslationManager(4)
                    contents Available methods (10) 

                    →protected translators -> array(2)

                        *DEPTH TOO GREAT*

                    →protected sortedTranslators -> array(2)

                        *DEPTH TOO GREAT*

                    protected defaultLangcode -> string(2) "en"

                    public _serviceId -> string(18) "string_translation"

            protected string -> string(10) "Last saved"

            protected arguments -> array(0) 

    →'#markup' => Drupal\Core\StringTranslation\TranslatableMarkup(5)

            contents Available methods (14) 

            protected translatedMarkup -> NULL

            protected options -> array(0)

            →protected stringTranslation -> Drupal\Core\StringTranslation\TranslationManager(4)
                    contents Available methods (10) 

                    →protected translators -> array(2)

                        *DEPTH TOO GREAT*

                    →protected sortedTranslators -> array(2)

                        *DEPTH TOO GREAT*

                    protected defaultLangcode -> string(2) "en"

                    public _serviceId -> string(18) "string_translation"

            protected string -> string(13) "Not saved yet"

            protected arguments -> array(0) 

    →'#wrapper_attributes' => array(1)

        →'class' => array(1)

            string(23) "entity-meta__last-saved"

→'author' => array(4)

    '#type' => string(4) "item"

    →'#title' => Drupal\Core\StringTranslation\TranslatableMarkup(5)

            contents Available methods (14) 

            protected translatedMarkup -> NULL

            protected options -> array(0)

            →protected stringTranslation -> Drupal\Core\StringTranslation\TranslationManager(4)
                    contents Available methods (10) 

                    →protected translators -> array(2)

                        *DEPTH TOO GREAT*

                    →protected sortedTranslators -> array(2)

                        *DEPTH TOO GREAT*

                    protected defaultLangcode -> string(2) "en"

                    public _serviceId -> string(18) "string_translation"

            protected string -> string(6) "Author"

            protected arguments -> array(0) 

    '#markup' => string(5) "@dmin"

    →'#wrapper_attributes' => array(1)

        →'class' => array(1)

            string(19) "entity-meta__author"
EN

回答 1

Drupal用户

发布于 2018-09-11 08:33:12

如果我正确理解了您的需求,那么您应该转到内容类型Manage form display配置页面,它应该在:/admin/structure/types/manage/YOUR_CONTENT_TYPE/form-display下面。

然后通过将Authored by和/或Authored on拖到表中的禁用区域,然后单击“保存”,从而禁用它们。

票数 1
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/269122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档