Drupal8:查找所有 FieldWidget 类型
前几天在寻找问题的答案时,我发现了一条评论,其中详细说明了打印出Drupal8中所有可用FieldWidget的命令。如果您正在寻找Drupal8中的所有字段小部件类,这将非常有用。
这是命令:
grep-rl'\@FieldWidget'|xargsgrep-m1'id='|grep-oFieldWidget.*
这会打印出类似于以下内容的内容:
FieldWidget/TimestampDatetimeWidget.php: * id = "datetime_timestamp", FieldWidget/EmailDefaultWidget.php: * id = "email_default", FieldWidget/OptionsSelectWidget.php: * id = "options_select", FieldWidget/StringTextareaWidget.php: * id = "string_textarea", FieldWidget/UriWidget.php: * id = "uri", FieldWidget/StringTextfieldWidget.php: * id = "string_textfield", FieldWidget/LanguageSelectWidget.php: * id = "language_select", FieldWidget/NumberWidget.php: * id = "number", FieldWidget/BooleanCheckboxWidget.php: * id = "boolean_checkbox", FieldWidget/EntityReferenceAutocompleteWidget.php: * id = "entity_reference_autocomplete", FieldWidget/OptionsButtonsWidget.php: * id = "options_buttons", FieldWidget/EntityReferenceAutocompleteTagsWidget.php: * id = "entity_reference_autocomplete_tags", FieldWidget/LayoutBuilderWidget.php: * id = "layout_builder_widget", FieldWidget/ModerationStateWidget.php: * id = "moderation_state_default", FieldWidget/DateRangeDatelistWidget.php: * id = "daterange_datelist", FieldWidget/DateRangeDefaultWidget.php: * id = "daterange_default", FieldWidget/FileWidget.php: * id = "file_generic", FieldWidget/DateTimeDatelistWidget.php: * id = "datetime_datelist", FieldWidget/DateTimeDefaultWidget.php: * id = "datetime_default", FieldWidget/CommentWidget.php: * id = "comment_default", FieldWidget/PathWidget.php: * id = "path", FieldWidget/TestTextfieldWidget.php: * id = "field_plugins_test_text_widget", FieldWidget/TestFieldWidget.php: * id = "test_field_widget", FieldWidget/TestFieldWidgetMultipleSingleValues.php: * id = "test_field_widget_multiple_single_value", FieldWidget/TestFieldWidgetMultiple.php: * id = "test_field_widget_multiple", FieldWidget/TestFieldWidgetMultilingual.php: * id = "test_field_widget_multilingual", FieldWidget/DummyAjaxWidget.php: * id = "image_module_test_dummy_ajax_widget", FieldWidget/ImageWidget.php: * id = "image_image", FieldWidget/TelephoneDefaultWidget.php: * id = "telephone_default", FieldWidget/ShapeOnlyColorEditableWidget.php: * id = "shape_only_color_editable_widget", FieldWidget/LinkWidget.php: * id = "link_default", FieldWidget/MediaLibraryInceptionWidget.php: * id = "media_library_inception_widget", FieldWidget/MediaLibraryWidget.php: * id = "media_library_widget", FieldWidget/TextareaWithSummaryWidget.php: * id = "text_textarea_with_summary", FieldWidget/TextfieldWidget.php: * id = "text_textfield", FieldWidget/TextareaWidget.php: * id = "text_textarea", FieldWidget/OEmbedWidget.php: * id = "oembed_textfield", FieldWidget/ViewsReferenceSelectWidget.php: * id = "viewsreference_select", FieldWidget/ViewsReferenceWidget.php: * id = "viewsreference_autocomplete", FieldWidget/EntityReferenceBrowserWidget.php: * id = "entity_browser_entity_reference", FieldWidget/FileBrowserWidget.php: * id = "entity_browser_file", FieldWidget/MetatagFirehose.php: * id = "metatag_firehose", FieldWidget/RedirectSourceWidget.php: * id = "redirect_source", FieldWidget/PanelizerWidget.php: * id = "panelizer", FieldWidget/ImageCropWidget.php: * id = "image_widget_crop", FieldWidget/EntityReferenceRevisionsAutocompleteWidget.php: * id = "entity_reference_revisions_autocomplete", FieldWidget/InlineParagraphsWidget.php: * id = "entity_reference_paragraphs", FieldWidget/ParagraphsWidget.php: * id = "paragraphs", FieldWidget/VideoTextfield.php: * id = "video_embed_field_textfield", FieldWidget/InlineEntityFormComplex.php: * id = "inline_entity_form_complex", FieldWidget/InlineEntityFormSimple.php: * id = "inline_entity_form_simple",
在osx中,命令略有不同,但打印出相同的结果。
grep-rl'\@FieldWidget'*|xargsgrep-0'id='|grep-oE'FieldWidget.*'