Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -540,7 +540,7 @@ function template_preprocess_forum_list(&$variables) {
$row = 0;
// Sanitize each forum so that the template can safely print the data.
foreach ($variables['forums'] as $id => $forum) {
$variables['forums'][$id]->description = Xss::filterAdmin($forum->description->value);
$variables['forums'][$id]->description = array('#markup' => $forum->description->value);
$variables['forums'][$id]->link = forum_uri($forum);
$variables['forums'][$id]->name = SafeMarkup::checkPlain($forum->label());
$variables['forums'][$id]->is_container = !empty($forum->forum_container->value);

View file

@ -0,0 +1,29 @@
id: d6_forum_settings
label: Drupal 6 forum configuration
migration_tags:
- Drupal 6
source:
plugin: variable
variables:
- forum_hot_topic
- forum_per_page
- forum_order
- forum_block_num_0
- forum_block_num_1
- forum_nav_vocabulary
process:
'block/active/limit': forum_block_num_0
'block/new/limit': forum_block_num_1
'topics/hot_threshold': forum_hot_topic
'topics/page_limit': forum_per_page
'topics/order': forum_order
vocabulary:
plugin: migration
migration: d6_taxonomy_vocabulary
source: forum_nav_vocabulary
destination:
plugin: config
config_name: forum.settings
migration_dependencies:
required:
- d6_taxonomy_vocabulary

View file

@ -86,9 +86,7 @@ class Overview extends OverviewTerms {
// Remove the alphabetical reset.
unset($form['actions']['reset_alphabetical']);
// The form needs to have submit and validate handlers set explicitly.
// Use the existing taxonomy overview submit handler.
$form['#submit'] = array('::submitForm');
$form['terms']['#empty'] = $this->t('No containers or forums available. <a href="@container">Add container</a> or <a href="@forum">Add forum</a>.', array(
'@container' => $this->url('forum.add_container'),
'@forum' => $this->url('forum.add_forum')

View file

@ -0,0 +1,92 @@
<?php
/**
* @file
* Contains Drupal\forum\ProxyClass\ForumUninstallValidator.
*/
/**
* This file was generated via php core/scripts/generate-proxy-class.php 'Drupal\forum\ForumUninstallValidator' "core/modules/forum/src".
*/
namespace Drupal\forum\ProxyClass {
/**
* Provides a proxy class for \Drupal\forum\ForumUninstallValidator.
*
* @see \Drupal\Component\ProxyBuilder
*/
class ForumUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
{
use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
/**
* The id of the original proxied service.
*
* @var string
*/
protected $drupalProxyOriginalServiceId;
/**
* The real proxied service, after it was lazy loaded.
*
* @var \Drupal\forum\ForumUninstallValidator
*/
protected $service;
/**
* The service container.
*
* @var \Symfony\Component\DependencyInjection\ContainerInterface
*/
protected $container;
/**
* Constructs a ProxyClass Drupal proxy object.
*
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The container.
* @param string $drupal_proxy_original_service_id
* The service ID of the original service.
*/
public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id)
{
$this->container = $container;
$this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
}
/**
* Lazy loads the real service from the container.
*
* @return object
* Returns the constructed real service.
*/
protected function lazyLoadItself()
{
if (!isset($this->service)) {
$this->service = $this->container->get($this->drupalProxyOriginalServiceId);
}
return $this->service;
}
/**
* {@inheritdoc}
*/
public function validate($module)
{
return $this->lazyLoadItself()->validate($module);
}
/**
* {@inheritdoc}
*/
public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
{
return $this->lazyLoadItself()->setStringTranslation($translation);
}
}
}

View file

@ -0,0 +1,59 @@
<?php
/**
* @file
* Contains \Drupal\forum\Tests\Migrate\d6\MigrateForumConfigsTest.
*/
namespace Drupal\forum\Tests\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to forum.settings.yml.
*
* @group forum
*/
class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('comment', 'forum', 'taxonomy');
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->prepareMigrations(array(
'd6_taxonomy_vocabulary' => array(
array(array(1), array('vocabulary_1_i_0_')),
)
));
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_forum_settings');
}
/**
* Tests migration of forum variables to forum.settings.yml.
*/
public function testForumSettings() {
$config = $this->config('forum.settings');
$this->assertIdentical(15, $config->get('topics.hot_threshold'));
$this->assertIdentical(25, $config->get('topics.page_limit'));
$this->assertIdentical(1, $config->get('topics.order'));
$this->assertIdentical('vocabulary_1_i_0_', $config->get('vocabulary'));
// This is 'forum_block_num_0' in D6, but block:active:limit' in D8.
$this->assertIdentical(5, $config->get('block.active.limit'));
// This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
$this->assertIdentical(5, $config->get('block.new.limit'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'forum.settings', $config->get());
}
}