Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
357ac577
Commit
357ac577
authored
Mar 26, 2013
by
Angie Byron
Browse files
Issue
#1943468
by andypost: Move Tags vocabulary to standard profile config.
parent
e35d1f18
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php
View file @
357ac577
...
...
@@ -40,7 +40,6 @@ function createVocabulary() {
'description'
=>
$this
->
randomName
(),
'vid'
=>
drupal_strtolower
(
$this
->
randomName
()),
'langcode'
=>
LANGUAGE_NOT_SPECIFIED
,
'help'
=>
''
,
'weight'
=>
mt_rand
(
0
,
10
),
));
$vocabulary
->
save
();
...
...
core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php
View file @
357ac577
...
...
@@ -60,7 +60,6 @@ protected function setupBundle() {
'description'
=>
$this
->
randomName
(),
'vid'
=>
$this
->
bundle
,
'langcode'
=>
LANGUAGE_NOT_SPECIFIED
,
'help'
=>
''
,
'weight'
=>
mt_rand
(
0
,
10
),
));
$this
->
vocabulary
->
save
();
...
...
@@ -110,7 +109,6 @@ function testTranslateLinkVocabularyAdminPage() {
'description'
=>
$this
->
randomName
(),
'vid'
=>
'untranslatable_voc'
,
'langcode'
=>
LANGUAGE_NOT_SPECIFIED
,
'help'
=>
''
,
'weight'
=>
mt_rand
(
0
,
10
),
));
$untranslatable_vocabulary
->
save
();
...
...
core/profiles/standard/config/taxonomy.vocabulary.tags.yml
0 → 100644
View file @
357ac577
vid
:
tags
name
:
Tags
description
:
'
Use
tags
to
group
articles
on
similar
topics
into
categories.'
hierarchy
:
'
0'
weight
:
'
0'
status
:
'
1'
langcode
:
en
core/profiles/standard/standard.install
View file @
357ac577
...
...
@@ -93,27 +93,16 @@ function standard_install() {
$user_settings
=
config
(
'user.settings'
);
$user_settings
->
set
(
'register'
,
USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL
)
->
save
();
// Create a default vocabulary named "Tags", enabled for the 'article' content type.
$description
=
st
(
'Use tags to group articles on similar topics into categories.'
);
$help
=
st
(
'Enter a comma-separated list of words to describe your content.'
);
$vocabulary
=
entity_create
(
'taxonomy_vocabulary'
,
array
(
'name'
=>
st
(
'Tags'
),
'description'
=>
$description
,
'vid'
=>
'tags'
,
'langcode'
=>
language_default
()
->
langcode
,
'help'
=>
$help
,
));
taxonomy_vocabulary_save
(
$vocabulary
);
// Create a default field named "Tags" for the 'article' content type.
$field
=
array
(
'field_name'
=>
'field_
'
.
$vocabulary
->
id
()
,
'field_name'
=>
'field_
tags'
,
'type'
=>
'taxonomy_term_reference'
,
// Set cardinality to unlimited for tagging.
'cardinality'
=>
FIELD_CARDINALITY_UNLIMITED
,
'settings'
=>
array
(
'allowed_values'
=>
array
(
array
(
'vocabulary'
=>
$vocabulary
->
id
()
,
'vocabulary'
=>
'tags'
,
'parent'
=>
0
,
),
),
...
...
@@ -121,12 +110,13 @@ function standard_install() {
);
field_create_field
(
$field
);
$help
=
st
(
'Enter a comma-separated list of words to describe your content.'
);
$instance
=
array
(
'field_name'
=>
'field_
'
.
$vocabulary
->
id
()
,
'field_name'
=>
'field_
tags'
,
'entity_type'
=>
'node'
,
'label'
=>
'Tags'
,
'bundle'
=>
'article'
,
'description'
=>
$
vocabulary
->
help
,
'description'
=>
$help
,
'widget'
=>
array
(
'type'
=>
'taxonomy_autocomplete'
,
'weight'
=>
-
4
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment