Update to Drupal 8.1.9. For more information, see https://www.drupal.org/project/drupal/releases/8.1.9
This commit is contained in:
parent
f9f23cdf38
commit
09b113657a
125 changed files with 2307 additions and 385 deletions
|
@ -108,10 +108,10 @@ class ActionListBuilder extends ConfigEntityListBuilder {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function render() {
|
||||
$build['action_header']['#markup'] = '<h3>' . t('Available actions:') . '</h3>';
|
||||
$build['action_header']['#markup'] = '<h3>' . $this->t('Available actions:') . '</h3>';
|
||||
$build['action_table'] = parent::render();
|
||||
if (!$this->hasConfigurableActions) {
|
||||
unset($build['action_table']['#header']['operations']);
|
||||
unset($build['action_table']['table']['#header']['operations']);
|
||||
}
|
||||
$build['action_admin_manage_form'] = \Drupal::formBuilder()->getForm('Drupal\action\Form\ActionAdminManageForm');
|
||||
return $build;
|
||||
|
|
37
core/modules/action/src/Tests/ActionListTest.php
Normal file
37
core/modules/action/src/Tests/ActionListTest.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\action\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Test behaviors when visiting the action listing page.
|
||||
*
|
||||
* @group action
|
||||
*/
|
||||
class ActionListTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to install.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('action');
|
||||
|
||||
/**
|
||||
* Tests the behavior when there are no actions to list in the admin page.
|
||||
*/
|
||||
public function testEmptyActionList() {
|
||||
// Create a user with permission to view the actions administration pages.
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer actions']));
|
||||
|
||||
// Ensure the empty text appears on the action list page.
|
||||
/** @var $storage \Drupal\Core\Entity\EntityStorageInterface */
|
||||
$storage = $this->container->get('entity.manager')->getStorage('action');
|
||||
$actions = $storage->loadMultiple();
|
||||
$storage->delete($actions);
|
||||
$this->drupalGet('/admin/config/system/actions');
|
||||
$this->assertRaw('There is no Action yet.');
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue