Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Plugin\Block\StatisticsPopularBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Access\AccessResult;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\StatisticsSettingsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsAdminTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsAttachedTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsLoggingTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsReportsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsTestBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\StatisticsTokenReplaceTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\Views\IntegrationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests\Views;
|
||||
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
|
|
|
@ -48,20 +48,20 @@ function statistics_node_view(array &$build, EntityInterface $node, EntityViewDi
|
|||
/**
|
||||
* Implements hook_node_links_alter().
|
||||
*/
|
||||
function statistics_node_links_alter(array &$node_links, NodeInterface $entity, array &$context) {
|
||||
function statistics_node_links_alter(array &$links, NodeInterface $entity, array &$context) {
|
||||
if ($context['view_mode'] != 'rss') {
|
||||
$node_links['#cache']['contexts'][] = 'user.permissions';
|
||||
$links['#cache']['contexts'][] = 'user.permissions';
|
||||
if (\Drupal::currentUser()->hasPermission('view post access counter')) {
|
||||
$statistics = statistics_get($entity->id());
|
||||
if ($statistics) {
|
||||
$links['statistics_counter']['title'] = \Drupal::translation()->formatPlural($statistics['totalcount'], '1 view', '@count views');
|
||||
$node_links['statistics'] = array(
|
||||
$statistics_links['statistics_counter']['title'] = \Drupal::translation()->formatPlural($statistics['totalcount'], '1 view', '@count views');
|
||||
$links['statistics'] = array(
|
||||
'#theme' => 'links__node__statistics',
|
||||
'#links' => $links,
|
||||
'#links' => $statistics_links,
|
||||
'#attributes' => array('class' => array('links', 'inline')),
|
||||
);
|
||||
}
|
||||
$node_links['#cache']['max-age'] = \Drupal::config('statistics.settings')->get('display_max_age');
|
||||
$links['#cache']['max-age'] = \Drupal::config('statistics.settings')->get('display_max_age');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\statistics\Tests\Migrate\d6\MigrateStatisticsConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\statistics\Tests\Migrate\d6;
|
||||
namespace Drupal\Tests\statistics\Kernel\Migrate\d6;
|
||||
|
||||
use Drupal\config\Tests\SchemaCheckTestTrait;
|
||||
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
|
||||
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
|
||||
|
||||
/**
|
||||
* Upgrade variables to statistics.settings.yml.
|
Reference in a new issue