core/modules/path/lib/Drupal/path/Type/PathItem.php | 1 - core/modules/path/path.module | 2 +- core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php | 1 + core/modules/taxonomy/taxonomy.module | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/modules/path/lib/Drupal/path/Type/PathItem.php b/core/modules/path/lib/Drupal/path/Type/PathItem.php index f853d88..9b8abd1 100644 --- a/core/modules/path/lib/Drupal/path/Type/PathItem.php +++ b/core/modules/path/lib/Drupal/path/Type/PathItem.php @@ -27,7 +27,6 @@ class PathItem extends FieldItemBase { * Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions(). */ public function getPropertyDefinitions() { - if (!isset(static::$propertyDefinitions)) { static::$propertyDefinitions['alias'] = array( 'type' => 'string', diff --git a/core/modules/path/path.module b/core/modules/path/path.module index f34ddd9..6cfb64a 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -278,7 +278,7 @@ function path_data_type_info() { * Implements hook_entity_field_info(). */ function path_entity_field_info($entity_type) { - if ($entity_type == 'taxonomy_term') { + if ($entity_type === 'taxonomy_term') { $info['definitions']['path'] = array( 'type' => 'path_field', 'label' => t('The path alias'), diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php index c6f4c8c..26790c9 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php @@ -24,6 +24,7 @@ class TermStorageController extends DatabaseStorageControllerNG { * vocabulary ID ('vid') is required. */ public function create(array $values) { + // Save new terms with no parents by default. if (empty($values['parent'])) { $values['parent'] = array(0); } diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 08dd87b..591b1c9 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -376,6 +376,8 @@ function taxonomy_menu() { * * @return bool * TRUE if access is allowed, FALSE if not. + * + * @see taxonomy_menu() */ function taxonomy_term_create_access(Vocabulary $vocabulary) { return entity_page_create_access('taxonomy_term', $vocabulary->id());