Update to Drupal 8.0.5. For more information, see https://www.drupal.org/node/2679347

This commit is contained in:
Pantheon Automation 2016-03-02 12:40:24 -08:00 committed by Greg Anderson
parent 2a9f1f148d
commit fd3b12cf27
251 changed files with 5439 additions and 957 deletions

View file

@ -0,0 +1,6 @@
name: 'Book module breadcrumb tests'
type: module
description: 'Support module for book module breadcrumb testing.'
package: Testing
version: VERSION
core: 8.x

View file

@ -0,0 +1,27 @@
<?php
/**
* @file
* Test module for testing the book module breadcrumb.
*/
use Drupal\Core\Access\AccessResultForbidden;
use Drupal\Core\Access\AccessResultNeutral;
use Drupal\Core\Session\AccountInterface;
use Drupal\node\NodeInterface;
/**
* Implements hook_node_access().
*/
function book_breadcrumb_test_node_access(NodeInterface $node, $operation, AccountInterface $account) {
$config = \Drupal::config('book_breadcrumb_test.settings');
if ($config->get('hide') && $node->getTitle() == "you can't see me" && $operation == 'view') {
$access = new AccessResultForbidden();
}
else {
$access = new AccessResultNeutral();
}
$access->addCacheableDependency($config);
$access->addCacheableDependency($node);
return $access;
}

View file

@ -0,0 +1,9 @@
# Schema for the configuration files of the book_breadcrumb_test module.
book_breadcrumb_test.settings:
type: config_object
label: 'Book Breadcrumb Test module settings'
mapping:
hide:
type: boolean
label: 'Setting for hiding content'