Issue #2168321 by longwave, martin107: Several files have incorrect indentation.
parent
5c29c0b411
commit
82f25bf143
|
@ -287,7 +287,7 @@ function _drupal_default_html_head() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves output to be displayed in the HEAD tag of the HTML page.
|
* Retrieves output to be displayed in the HEAD tag of the HTML page.
|
||||||
*/
|
*/
|
||||||
function drupal_get_html_head() {
|
function drupal_get_html_head() {
|
||||||
$elements = drupal_add_html_head();
|
$elements = drupal_add_html_head();
|
||||||
\Drupal::moduleHandler()->alter('html_head', $elements);
|
\Drupal::moduleHandler()->alter('html_head', $elements);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* API functions for installing modules and themes.
|
* API functions for installing modules and themes.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -205,35 +205,35 @@ function module_uninstall($module_list = array(), $uninstall_dependents = TRUE)
|
||||||
* @} End of "defgroup hooks".
|
* @} End of "defgroup hooks".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup callbacks Callbacks
|
* @defgroup callbacks Callbacks
|
||||||
* @{
|
* @{
|
||||||
* Callback function signatures.
|
* Callback function signatures.
|
||||||
*
|
*
|
||||||
* Drupal's API sometimes uses callback functions to allow you to define how
|
* Drupal's API sometimes uses callback functions to allow you to define how
|
||||||
* some type of processing happens. A callback is a function with a defined
|
* some type of processing happens. A callback is a function with a defined
|
||||||
* signature, which you define in a module. Then you pass the function name as
|
* signature, which you define in a module. Then you pass the function name as
|
||||||
* a parameter to a Drupal API function or return it as part of a hook
|
* a parameter to a Drupal API function or return it as part of a hook
|
||||||
* implementation return value, and your function is called at an appropriate
|
* implementation return value, and your function is called at an appropriate
|
||||||
* time. For instance, when setting up batch processing you might need to
|
* time. For instance, when setting up batch processing you might need to
|
||||||
* provide a callback function for each processing step and/or a callback for
|
* provide a callback function for each processing step and/or a callback for
|
||||||
* when processing is finished; you would do that by defining these functions
|
* when processing is finished; you would do that by defining these functions
|
||||||
* and passing their names into the batch setup function.
|
* and passing their names into the batch setup function.
|
||||||
*
|
*
|
||||||
* Callback function signatures, like hook definitions, are described by
|
* Callback function signatures, like hook definitions, are described by
|
||||||
* creating and documenting dummy functions in a *.api.php file; normally, the
|
* creating and documenting dummy functions in a *.api.php file; normally, the
|
||||||
* dummy callback function's name should start with "callback_", and you should
|
* dummy callback function's name should start with "callback_", and you should
|
||||||
* document the parameters and return value and provide a sample function body.
|
* document the parameters and return value and provide a sample function body.
|
||||||
* Then your API documentation can refer to this callback function in its
|
* Then your API documentation can refer to this callback function in its
|
||||||
* documentation. A user of your API can usually name their callback function
|
* documentation. A user of your API can usually name their callback function
|
||||||
* anything they want, although a standard name would be to replace "callback_"
|
* anything they want, although a standard name would be to replace "callback_"
|
||||||
* with the module name.
|
* with the module name.
|
||||||
*
|
*
|
||||||
* @see hooks
|
* @see hooks
|
||||||
* @see themeable
|
* @see themeable
|
||||||
*
|
*
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of modules required by core.
|
* Returns an array of modules required by core.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Contains \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator.
|
* Contains \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\Component\Plugin\Discovery;
|
namespace Drupal\Component\Plugin\Discovery;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\Core\Plugin\Exception\InvalidDecoratedMethod.
|
* Definition of Drupal\Core\Plugin\Exception\InvalidDecoratedMethod.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\Component\Plugin\Exception;
|
namespace Drupal\Component\Plugin\Exception;
|
||||||
|
|
||||||
|
|
|
@ -228,9 +228,9 @@ class MemoryBackend implements CacheBackendInterface {
|
||||||
public function garbageCollection() {
|
public function garbageCollection() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function removeBin() {}
|
public function removeBin() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Contains \Drupal\Core\Config\ConfigImporterException.
|
* Contains \Drupal\Core\Config\ConfigImporterException.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\Core\Config;
|
namespace Drupal\Core\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception thrown when a config import fails.
|
* Exception thrown when a config import fails.
|
||||||
*/
|
*/
|
||||||
class ConfigImporterException extends ConfigException {}
|
class ConfigImporterException extends ConfigException {}
|
||||||
|
|
|
@ -124,15 +124,15 @@ class Merge extends Query implements ConditionInterface {
|
||||||
protected $needsUpdate = FALSE;
|
protected $needsUpdate = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a Merge object.
|
* Constructs a Merge object.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Database\Connection $connection
|
* @param \Drupal\Core\Database\Connection $connection
|
||||||
* A Connection object.
|
* A Connection object.
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* Name of the table to associate with this query.
|
* Name of the table to associate with this query.
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* Array of database options.
|
* Array of database options.
|
||||||
*/
|
*/
|
||||||
public function __construct(Connection $connection, $table, array $options = array()) {
|
public function __construct(Connection $connection, $table, array $options = array()) {
|
||||||
$options['return'] = Database::RETURN_AFFECTED;
|
$options['return'] = Database::RETURN_AFFECTED;
|
||||||
parent::__construct($connection, $options);
|
parent::__construct($connection, $options);
|
||||||
|
|
|
@ -246,14 +246,14 @@ abstract class FileTransfer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes backslashes to slashes, also removes a trailing slash.
|
* Changes backslashes to slashes, also removes a trailing slash.
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* The path to modify.
|
* The path to modify.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* The modified path.
|
* The modified path.
|
||||||
*/
|
*/
|
||||||
function sanitizePath($path) {
|
function sanitizePath($path) {
|
||||||
$path = str_replace('\\', '/', $path); // Windows path sanitization.
|
$path = str_replace('\\', '/', $path); // Windows path sanitization.
|
||||||
if (substr($path, -1) == '/') {
|
if (substr($path, -1) == '/') {
|
||||||
|
|
|
@ -27,10 +27,10 @@ class CountryManager implements CountryManagerInterface {
|
||||||
protected $countries;
|
protected $countries;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||||
*/
|
*/
|
||||||
public function __construct(ModuleHandlerInterface $module_handler) {
|
public function __construct(ModuleHandlerInterface $module_handler) {
|
||||||
$this->moduleHandler = $module_handler;
|
$this->moduleHandler = $module_handler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,12 @@ interface LocalActionInterface {
|
||||||
*/
|
*/
|
||||||
public function getRouteParameters(Request $request);
|
public function getRouteParameters(Request $request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the weight for the local action.
|
* Returns the weight for the local action.
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getWeight();
|
public function getWeight();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns options for rendering a link for the local action.
|
* Returns options for rendering a link for the local action.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Definition of Drupal\Core\Plugin\Discovery\AlterDiscoveryDecorator.
|
* Definition of Drupal\Core\Plugin\Discovery\AlterDiscoveryDecorator.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Drupal\Core\Plugin\Discovery;
|
namespace Drupal\Core\Plugin\Discovery;
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ interface TranslatableInterface {
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* TRUE if the translation exists, FALSE otherwise.
|
* TRUE if the translation exists, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
public function hasTranslation($langcode);
|
public function hasTranslation($langcode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* Provides an HTTP Basic authentication provider.
|
* Provides an HTTP Basic authentication provider.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_help().
|
* Implements hook_help().
|
||||||
*/
|
*/
|
||||||
function basic_auth_help($path, $arg) {
|
function basic_auth_help($path, $arg) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ConfigTranslationController extends ControllerBase {
|
||||||
*/
|
*/
|
||||||
protected $accessManager;
|
protected $accessManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The dynamic router service.
|
* The dynamic router service.
|
||||||
*
|
*
|
||||||
* @var \Symfony\Component\Routing\Matcher\RequestMatcherInterface
|
* @var \Symfony\Component\Routing\Matcher\RequestMatcherInterface
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{#
|
{#
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Default theme implementation for a form element in config_translation.
|
* Default theme implementation for a form element in config_translation.
|
||||||
*
|
*
|
||||||
* Available variables:
|
* Available variables:
|
||||||
* - element: Array that represents the element shown in the form.
|
* - element: Array that represents the element shown in the form.
|
||||||
* - source: The source of the translation.
|
* - source: The source of the translation.
|
||||||
* - translation: The translation for the target language.
|
* - translation: The translation for the target language.
|
||||||
*
|
*
|
||||||
* @see template_preprocess()
|
* @see template_preprocess()
|
||||||
* @see template_preprocess_config_translation_manage_form_element()
|
* @see template_preprocess_config_translation_manage_form_element()
|
||||||
*
|
*
|
||||||
* @ingroup themeable
|
* @ingroup themeable
|
||||||
*/
|
*/
|
||||||
#}
|
#}
|
||||||
<div class="clearfix translation-element-wrapper">
|
<div class="clearfix translation-element-wrapper">
|
||||||
<div class="source">
|
<div class="source">
|
||||||
|
|
|
@ -279,8 +279,8 @@ class ContactSitewideTest extends WebTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests auto-reply on the site-wide contact form.
|
* Tests auto-reply on the site-wide contact form.
|
||||||
*/
|
*/
|
||||||
function testAutoReply() {
|
function testAutoReply() {
|
||||||
// Create and login administrative user.
|
// Create and login administrative user.
|
||||||
$admin_user = $this->drupalCreateUser(array('access site-wide contact form', 'administer contact forms', 'administer permissions', 'administer users'));
|
$admin_user = $this->drupalCreateUser(array('access site-wide contact form', 'administer contact forms', 'administer permissions', 'administer users'));
|
||||||
|
|
|
@ -15,10 +15,10 @@ use Drupal\Core\Language\Language;
|
||||||
class FilePrivateTest extends FileFieldTestBase {
|
class FilePrivateTest extends FileFieldTestBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modules to enable.
|
* Modules to enable.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public static $modules = array('node_access_test', 'field_test');
|
public static $modules = array('node_access_test', 'field_test');
|
||||||
|
|
||||||
public static function getInfo() {
|
public static function getInfo() {
|
||||||
|
|
|
@ -38,6 +38,6 @@ function hook_image_style_flush($style) {
|
||||||
\Drupal::cache('mymodule')->deleteAll();
|
\Drupal::cache('mymodule')->deleteAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @} End of "addtogroup hooks".
|
* @} End of "addtogroup hooks".
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -80,7 +80,7 @@ class TranslationString extends StringBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements Drupal\locale\StringInterface::isTranslation().
|
* Implements Drupal\locale\StringInterface::isTranslation().
|
||||||
*/
|
*/
|
||||||
public function isTranslation() {
|
public function isTranslation() {
|
||||||
return !empty($this->lid) && !empty($this->language) && isset($this->translation);
|
return !empty($this->lid) && !empty($this->language) && isset($this->translation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ require_once __DIR__ . '/locale.translation.inc';
|
||||||
* Optional, defaults to TRUE.
|
* Optional, defaults to TRUE.
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* The batch context.
|
* The batch context.
|
||||||
*/
|
*/
|
||||||
function locale_translation_batch_status_check($project, $langcode, $options = array(), &$context) {
|
function locale_translation_batch_status_check($project, $langcode, $options = array(), &$context) {
|
||||||
$failure = $checked = FALSE;
|
$failure = $checked = FALSE;
|
||||||
$options += array(
|
$options += array(
|
||||||
|
|
|
@ -41,8 +41,8 @@ class Type extends Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render node type as human readable name, unless using machine_name option.
|
* Render node type as human readable name, unless using machine_name option.
|
||||||
*/
|
*/
|
||||||
function render_name($data, $values) {
|
function render_name($data, $values) {
|
||||||
if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
|
if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
|
||||||
$type = entity_load('node_type', $data);
|
$type = entity_load('node_type', $data);
|
||||||
|
|
|
@ -20,9 +20,9 @@ class NodeBuildContentTest extends NodeTestBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures that content array is rebuilt on every call to node_build_content().
|
* Ensures that content array is rebuilt on every call to node_build_content().
|
||||||
*/
|
*/
|
||||||
function testNodeRebuildContent() {
|
function testNodeRebuildContent() {
|
||||||
$node = $this->drupalCreateNode();
|
$node = $this->drupalCreateNode();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class OptionsWidgetsTest extends FieldTestBase {
|
||||||
*/
|
*/
|
||||||
public static $modules = array('node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui');
|
public static $modules = array('node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A field with cardinality 1 to use in this test class.
|
* A field with cardinality 1 to use in this test class.
|
||||||
*
|
*
|
||||||
* @var \Drupal\field\Entity\FieldConfig
|
* @var \Drupal\field\Entity\FieldConfig
|
||||||
|
|
|
@ -19,7 +19,7 @@ use Drupal\entity\Entity\EntityViewDisplay;
|
||||||
*/
|
*/
|
||||||
class MetadataGenerator implements MetadataGeneratorInterface {
|
class MetadataGenerator implements MetadataGeneratorInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object that checks if a user has access to edit a given entity field.
|
* An object that checks if a user has access to edit a given entity field.
|
||||||
*
|
*
|
||||||
* @var \Drupal\quickedit\Access\EditEntityFieldAccessCheckInterface
|
* @var \Drupal\quickedit\Access\EditEntityFieldAccessCheckInterface
|
||||||
|
|
|
@ -33,8 +33,8 @@ class TextFieldRdfaTest extends FieldRdfaTestBase {
|
||||||
protected $testSummary = 'test_summary_value';
|
protected $testSummary = 'test_summary_value';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public static $modules = array('text');
|
public static $modules = array('text');
|
||||||
|
|
||||||
public static function getInfo() {
|
public static function getInfo() {
|
||||||
|
|
|
@ -87,7 +87,7 @@ interface ShortcutInterface extends ContentEntityInterface {
|
||||||
*
|
*
|
||||||
* @return \Drupal\shortcut\ShortcutInterface
|
* @return \Drupal\shortcut\ShortcutInterface
|
||||||
* The called shortcut entity.
|
* The called shortcut entity.
|
||||||
*/
|
*/
|
||||||
public function setRouteParams($route_parameters);
|
public function setRouteParams($route_parameters);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ class ShortcutSetAccessController extends EntityAccessController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
|
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
|
||||||
return $account->hasPermission('administer shortcuts') || $account->hasPermission('customize shortcut links');
|
return $account->hasPermission('administer shortcuts') || $account->hasPermission('customize shortcut links');
|
||||||
|
|
|
@ -285,8 +285,8 @@ table.system-status-report .status-title {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Theme display without vertical toolbar.
|
* Theme display without vertical toolbar.
|
||||||
*/
|
*/
|
||||||
@media screen and (min-width: 45em) {
|
@media screen and (min-width: 45em) {
|
||||||
body:not(.toolbar-vertical) .system-themes-list-enabled .screenshot,
|
body:not(.toolbar-vertical) .system-themes-list-enabled .screenshot,
|
||||||
body:not(.toolbar-vertical) .system-themes-list-enabled .no-screenshot {
|
body:not(.toolbar-vertical) .system-themes-list-enabled .no-screenshot {
|
||||||
|
@ -320,8 +320,8 @@ table.system-status-report .status-title {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Theme display with vertical toolbar.
|
* Theme display with vertical toolbar.
|
||||||
*/
|
*/
|
||||||
@media screen and (min-width: 60em) {
|
@media screen and (min-width: 60em) {
|
||||||
.toolbar-vertical .system-themes-list-enabled .screenshot,
|
.toolbar-vertical .system-themes-list-enabled .screenshot,
|
||||||
.toolbar-vertical .system-themes-list-enabled .no-screenshot {
|
.toolbar-vertical .system-themes-list-enabled .no-screenshot {
|
||||||
|
|
|
@ -266,7 +266,7 @@ body div.tabledrag-changed-warning {
|
||||||
* TableSelect behavior.
|
* TableSelect behavior.
|
||||||
*
|
*
|
||||||
* @see tableselect.js
|
* @see tableselect.js
|
||||||
*/
|
*/
|
||||||
tr.selected td {
|
tr.selected td {
|
||||||
background: #ffc;
|
background: #ffc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,51 +103,51 @@ class EntityApiTest extends EntityUnitTestBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that exceptions are properly thrown when saving or deleting an
|
* Tests that exceptions are properly thrown when saving or deleting an
|
||||||
* entity.
|
* entity.
|
||||||
*/
|
*/
|
||||||
public function testEntityStorageExceptionHandling() {
|
public function testEntityStorageExceptionHandling() {
|
||||||
$entity = entity_create('entity_test', array('name' => 'test'));
|
$entity = entity_create('entity_test', array('name' => 'test'));
|
||||||
try {
|
try {
|
||||||
$GLOBALS['entity_test_throw_exception'] = TRUE;
|
$GLOBALS['entity_test_throw_exception'] = TRUE;
|
||||||
$entity->save();
|
$entity->save();
|
||||||
$this->fail('Entity presave EntityStorageException thrown but not caught.');
|
$this->fail('Entity presave EntityStorageException thrown but not caught.');
|
||||||
}
|
}
|
||||||
catch (EntityStorageException $e) {
|
catch (EntityStorageException $e) {
|
||||||
$this->assertEqual($e->getcode(), 1, 'Entity presave EntityStorageException caught.');
|
$this->assertEqual($e->getcode(), 1, 'Entity presave EntityStorageException caught.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$entity = entity_create('entity_test', array('name' => 'test2'));
|
$entity = entity_create('entity_test', array('name' => 'test2'));
|
||||||
try {
|
try {
|
||||||
unset($GLOBALS['entity_test_throw_exception']);
|
unset($GLOBALS['entity_test_throw_exception']);
|
||||||
$entity->save();
|
$entity->save();
|
||||||
$this->pass('Exception presave not thrown and not caught.');
|
$this->pass('Exception presave not thrown and not caught.');
|
||||||
}
|
}
|
||||||
catch (EntityStorageException $e) {
|
catch (EntityStorageException $e) {
|
||||||
$this->assertNotEqual($e->getCode(), 1, 'Entity presave EntityStorageException caught.');
|
$this->assertNotEqual($e->getCode(), 1, 'Entity presave EntityStorageException caught.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$entity = entity_create('entity_test', array('name' => 'test3'));
|
$entity = entity_create('entity_test', array('name' => 'test3'));
|
||||||
$entity->save();
|
$entity->save();
|
||||||
try {
|
try {
|
||||||
$GLOBALS['entity_test_throw_exception'] = TRUE;
|
$GLOBALS['entity_test_throw_exception'] = TRUE;
|
||||||
$entity->delete();
|
$entity->delete();
|
||||||
$this->fail('Entity predelete EntityStorageException not thrown.');
|
$this->fail('Entity predelete EntityStorageException not thrown.');
|
||||||
}
|
}
|
||||||
catch (EntityStorageException $e) {
|
catch (EntityStorageException $e) {
|
||||||
$this->assertEqual($e->getCode(), 2, 'Entity predelete EntityStorageException caught.');
|
$this->assertEqual($e->getCode(), 2, 'Entity predelete EntityStorageException caught.');
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($GLOBALS['entity_test_throw_exception']);
|
unset($GLOBALS['entity_test_throw_exception']);
|
||||||
$entity = entity_create('entity_test', array('name' => 'test4'));
|
$entity = entity_create('entity_test', array('name' => 'test4'));
|
||||||
$entity->save();
|
$entity->save();
|
||||||
try {
|
try {
|
||||||
$entity->delete();
|
$entity->delete();
|
||||||
$this->pass('Entity predelete EntityStorageException not thrown and not caught.');
|
$this->pass('Entity predelete EntityStorageException not thrown and not caught.');
|
||||||
}
|
}
|
||||||
catch (EntityStorageException $e) {
|
catch (EntityStorageException $e) {
|
||||||
$this->assertNotEqual($e->getCode(), 2, 'Entity predelete EntityStorageException thrown.');
|
$this->assertNotEqual($e->getCode(), 2, 'Entity predelete EntityStorageException thrown.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ class ValidationTest extends WebTestBase {
|
||||||
$this->assertNoRaw(t('%name field is not in the right format.', array('%name' => 'Client side validation')));
|
$this->assertNoRaw(t('%name field is not in the right format.', array('%name' => 'Client side validation')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests #required with custom validation errors.
|
* Tests #required with custom validation errors.
|
||||||
*
|
*
|
||||||
* @see form_test_validate_required_form()
|
* @see form_test_validate_required_form()
|
||||||
|
|
|
@ -29,7 +29,7 @@ const DRUPAL_USER_TIMEZONE_EMPTY = 1;
|
||||||
*/
|
*/
|
||||||
const DRUPAL_USER_TIMEZONE_SELECT = 2;
|
const DRUPAL_USER_TIMEZONE_SELECT = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disabled option on forms and settings
|
* Disabled option on forms and settings
|
||||||
*/
|
*/
|
||||||
const DRUPAL_DISABLED = 0;
|
const DRUPAL_DISABLED = 0;
|
||||||
|
|
|
@ -263,7 +263,7 @@ function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
|
||||||
return entity_view($term, $view_mode, $langcode);
|
return entity_view($term, $view_mode, $langcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a drupal_render() style array from an array of loaded terms.
|
* Constructs a drupal_render() style array from an array of loaded terms.
|
||||||
*
|
*
|
||||||
* @param array $terms
|
* @param array $terms
|
||||||
|
|
|
@ -86,7 +86,7 @@ div.password-suggestions ul {
|
||||||
clear: right;
|
clear: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Password strength indicator on narrow viewport.
|
* Password strength indicator on narrow viewport.
|
||||||
*/
|
*/
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
|
|
|
@ -127,9 +127,9 @@ class UserPasswordResetTest extends WebTestBase {
|
||||||
return $urls[0];
|
return $urls[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefill the text box on incorrect login via link to password reset page.
|
* Prefill the text box on incorrect login via link to password reset page.
|
||||||
*/
|
*/
|
||||||
public function testUserResetPasswordTextboxFilled() {
|
public function testUserResetPasswordTextboxFilled() {
|
||||||
$this->drupalGet('user/login');
|
$this->drupalGet('user/login');
|
||||||
$edit = array(
|
$edit = array(
|
||||||
|
|
|
@ -162,7 +162,7 @@ class UserValidationTest extends DrupalUnitTestBase {
|
||||||
* The field that violates the maximum length.
|
* The field that violates the maximum length.
|
||||||
* @param int $length
|
* @param int $length
|
||||||
* Number of characters that was exceeded.
|
* Number of characters that was exceeded.
|
||||||
*/
|
*/
|
||||||
protected function assertLengthViolation(EntityInterface $entity, $field_name, $length) {
|
protected function assertLengthViolation(EntityInterface $entity, $field_name, $length) {
|
||||||
$violations = $entity->validate();
|
$violations = $entity->validate();
|
||||||
$this->assertEqual(count($violations), 1, "Violation found when $field_name is too long.");
|
$this->assertEqual(count($violations), 1, "Violation found when $field_name is too long.");
|
||||||
|
|
|
@ -828,7 +828,7 @@ function user_pass_reset_url($account, $options = array()) {
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* (optional) A keyed array of settings. Supported options are:
|
* (optional) A keyed array of settings. Supported options are:
|
||||||
* - langcode: A language code to be used when generating locale-sensitive
|
* - langcode: A language code to be used when generating locale-sensitive
|
||||||
* URLs. If langcode is NULL the users preferred language is used.
|
* URLs. If langcode is NULL the users preferred language is used.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* A unique URL that may be used to confirm the cancellation of the user
|
* A unique URL that may be used to confirm the cancellation of the user
|
||||||
|
|
|
@ -45,7 +45,7 @@ class ViewsHandlerManager extends DefaultPluginManager {
|
||||||
* An object that implements \Traversable which contains the root paths
|
* An object that implements \Traversable which contains the root paths
|
||||||
* keyed by the corresponding namespace to look for plugin implementations,
|
* keyed by the corresponding namespace to look for plugin implementations,
|
||||||
* @param \Drupal\views\ViewsData $views_data
|
* @param \Drupal\views\ViewsData $views_data
|
||||||
* The views data cache.
|
* The views data cache.
|
||||||
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
|
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
|
||||||
* Cache backend instance to use.
|
* Cache backend instance to use.
|
||||||
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
|
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
|
||||||
|
|
|
@ -72,7 +72,7 @@ abstract class PluginBase extends ComponentPluginBase implements ContainerFactor
|
||||||
*/
|
*/
|
||||||
public $definition;
|
public $definition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Denotes whether the plugin has an additional options form.
|
* Denotes whether the plugin has an additional options form.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
|
|
|
@ -28,10 +28,10 @@ class View extends AreaPluginBase {
|
||||||
protected $isEmpty;
|
protected $isEmpty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The view storage.
|
* The view storage.
|
||||||
*
|
*
|
||||||
* @var \Drupal\Core\Entity\EntityStorageInterface
|
* @var \Drupal\Core\Entity\EntityStorageInterface
|
||||||
*/
|
*/
|
||||||
protected $viewStorage;
|
protected $viewStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -105,15 +105,15 @@ abstract class CachePluginBase extends PluginBase {
|
||||||
protected function cacheExpire($type) {
|
protected function cacheExpire($type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine expiration time in the cache table of the cache type
|
* Determine expiration time in the cache table of the cache type
|
||||||
* or CACHE_PERMANENT if item shouldn't be removed automatically from cache.
|
* or CACHE_PERMANENT if item shouldn't be removed automatically from cache.
|
||||||
*
|
*
|
||||||
* Plugins must override this to implement expiration in the cache table.
|
* Plugins must override this to implement expiration in the cache table.
|
||||||
*
|
*
|
||||||
* @param $type
|
* @param $type
|
||||||
* The cache type, either 'query', 'result' or 'output'.
|
* The cache type, either 'query', 'result' or 'output'.
|
||||||
*/
|
*/
|
||||||
protected function cacheSetExpire($type) {
|
protected function cacheSetExpire($type) {
|
||||||
return Cache::PERMANENT;
|
return Cache::PERMANENT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2346,33 +2346,33 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the output of the view empty.
|
* Is the output of the view empty.
|
||||||
*
|
*
|
||||||
* If a view has no result and neither the empty, nor the footer nor the header
|
* If a view has no result and neither the empty, nor the footer nor the header
|
||||||
* does show anything return FALSE.
|
* does show anything return FALSE.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* Returns TRUE if the output is empty, else FALSE.
|
* Returns TRUE if the output is empty, else FALSE.
|
||||||
*/
|
*/
|
||||||
public function outputIsEmpty() {
|
public function outputIsEmpty() {
|
||||||
if (!empty($this->view->result)) {
|
if (!empty($this->view->result)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether all of the area handlers are empty.
|
// Check whether all of the area handlers are empty.
|
||||||
foreach (array('empty', 'footer', 'header') as $type) {
|
foreach (array('empty', 'footer', 'header') as $type) {
|
||||||
$handlers = $this->getHandlers($type);
|
$handlers = $this->getHandlers($type);
|
||||||
foreach ($handlers as $handler) {
|
foreach ($handlers as $handler) {
|
||||||
// If one is not empty, return FALSE now.
|
// If one is not empty, return FALSE now.
|
||||||
if (!$handler->isEmpty()) {
|
if (!$handler->isEmpty()) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide the block system with any exposed widget blocks for this display.
|
* Provide the block system with any exposed widget blocks for this display.
|
||||||
|
|
|
@ -273,16 +273,16 @@ abstract class ExposedFormPluginBase extends PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is executed when exposed form is submited.
|
* This function is executed when exposed form is submited.
|
||||||
*
|
*
|
||||||
* @param $form
|
* @param $form
|
||||||
* Nested array of form elements that comprise the form.
|
* Nested array of form elements that comprise the form.
|
||||||
* @param $form_state
|
* @param $form_state
|
||||||
* A keyed array containing the current state of the form.
|
* A keyed array containing the current state of the form.
|
||||||
* @param $exclude
|
* @param $exclude
|
||||||
* Nested array of keys to exclude of insert into
|
* Nested array of keys to exclude of insert into
|
||||||
* $view->exposed_raw_input
|
* $view->exposed_raw_input
|
||||||
*/
|
*/
|
||||||
public function exposedFormSubmit(&$form, &$form_state, &$exclude) {
|
public function exposedFormSubmit(&$form, &$form_state, &$exclude) {
|
||||||
if (!empty($form_state['values']['op']) && $form_state['values']['op'] == $this->options['reset_button_label']) {
|
if (!empty($form_state['values']['op']) && $form_state['values']['op'] == $this->options['reset_button_label']) {
|
||||||
$this->resetForm($form, $form_state);
|
$this->resetForm($form, $form_state);
|
||||||
|
|
|
@ -619,7 +619,7 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the build group options form.
|
* Validate the build group options form.
|
||||||
*/
|
*/
|
||||||
protected function buildGroupValidate($form, &$form_state) {
|
protected function buildGroupValidate($form, &$form_state) {
|
||||||
|
@ -714,7 +714,7 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide default options for exposed filters.
|
* Provide default options for exposed filters.
|
||||||
*/
|
*/
|
||||||
protected function buildGroupOptions() {
|
protected function buildGroupOptions() {
|
||||||
|
|
|
@ -71,13 +71,13 @@ abstract class StylePluginBase extends PluginBase {
|
||||||
protected $usesFields = FALSE;
|
protected $usesFields = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the rendered field values, keyed by the row index and field name.
|
* Stores the rendered field values, keyed by the row index and field name.
|
||||||
*
|
*
|
||||||
* @see \Drupal\views\Plugin\views\style\StylePluginBase::renderFields()
|
* @see \Drupal\views\Plugin\views\style\StylePluginBase::renderFields()
|
||||||
* @see \Drupal\views\Plugin\views\style\StylePluginBase::getField()
|
* @see \Drupal\views\Plugin\views\style\StylePluginBase::getField()
|
||||||
*
|
*
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
protected $rendered_fields;
|
protected $rendered_fields;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -661,13 +661,13 @@ abstract class StylePluginBase extends PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the raw field value.
|
* Get the raw field value.
|
||||||
*
|
*
|
||||||
* @param $index
|
* @param $index
|
||||||
* The index count of the row.
|
* The index count of the row.
|
||||||
* @param $field
|
* @param $field
|
||||||
* The id of the field.
|
* The id of the field.
|
||||||
*/
|
*/
|
||||||
protected function getFieldValue($index, $field) {
|
protected function getFieldValue($index, $field) {
|
||||||
$this->view->row_index = $index;
|
$this->view->row_index = $index;
|
||||||
$value = $this->view->field[$field]->getValue($this->view->result[$index]);
|
$value = $this->view->field[$field]->getValue($this->view->result[$index]);
|
||||||
|
|
|
@ -189,7 +189,7 @@ class HandlerTest extends ViewTestBase {
|
||||||
$this->assertEqual('and', $handler->operator);
|
$this->assertEqual('and', $handler->operator);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the order of handlers is the same before and after saving.
|
* Tests the order of handlers is the same before and after saving.
|
||||||
*/
|
*/
|
||||||
public function testHandlerWeights() {
|
public function testHandlerWeights() {
|
||||||
|
|
|
@ -230,7 +230,7 @@ class ViewExecutable extends DependencySerialization {
|
||||||
*/
|
*/
|
||||||
public $row_index;
|
public $row_index;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow to override the url of the current view.
|
* Allow to override the url of the current view.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
|
|
|
@ -275,19 +275,19 @@ function template_preprocess_views_view_fields(&$variables) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns HTML for multiple views fields.
|
* Returns HTML for multiple views fields.
|
||||||
*
|
*
|
||||||
* @param $variables
|
* @param $variables
|
||||||
* An associative array containing:
|
* An associative array containing:
|
||||||
* - fields: An array of field objects. Each field object contains:
|
* - fields: An array of field objects. Each field object contains:
|
||||||
* - separator: A string that separates the fields.
|
* - separator: A string that separates the fields.
|
||||||
* - wrapper_suffix: A string added to the beginning of the fields.
|
* - wrapper_suffix: A string added to the beginning of the fields.
|
||||||
* - label_html: An HTML string that labels the fields.
|
* - label_html: An HTML string that labels the fields.
|
||||||
* - content: The fields.
|
* - content: The fields.
|
||||||
* - wrapper_suffix: A string added to the end of the fields.
|
* - wrapper_suffix: A string added to the end of the fields.
|
||||||
*
|
*
|
||||||
* @see template_preprocess_views_view_fields()
|
* @see template_preprocess_views_view_fields()
|
||||||
*/
|
*/
|
||||||
function theme_views_view_fields($variables) {
|
function theme_views_view_fields($variables) {
|
||||||
$fields = $variables['fields'];
|
$fields = $variables['fields'];
|
||||||
$output = '';
|
$output = '';
|
||||||
|
@ -320,7 +320,7 @@ function theme_views_view_fields($variables) {
|
||||||
* grouping.
|
* grouping.
|
||||||
* - content: The content to be grouped.
|
* - content: The content to be grouped.
|
||||||
* - title: The group heading.
|
* - title: The group heading.
|
||||||
*/
|
*/
|
||||||
function template_preprocess_views_view_grouping(&$variables) {
|
function template_preprocess_views_view_grouping(&$variables) {
|
||||||
$variables['content'] = $variables['view']->style_plugin->renderGroupingSets($variables['rows'], $variables['grouping_level']);
|
$variables['content'] = $variables['view']->style_plugin->renderGroupingSets($variables['rows'], $variables['grouping_level']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -586,7 +586,7 @@ td.group-title {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @end */
|
/* @end */
|
||||||
|
|
||||||
/* @group Auto preview
|
/* @group Auto preview
|
||||||
*
|
*
|
||||||
|
|
|
@ -352,7 +352,7 @@ function theme_views_ui_rearrange_filter_form(&$variables) {
|
||||||
* @param array $variables
|
* @param array $variables
|
||||||
* An associative array containing:
|
* An associative array containing:
|
||||||
* - form: A render element representing the form.
|
* - form: A render element representing the form.
|
||||||
*/
|
*/
|
||||||
function template_preprocess_views_ui_style_plugin_table(&$variables) {
|
function template_preprocess_views_ui_style_plugin_table(&$variables) {
|
||||||
$form = $variables['form'];
|
$form = $variables['form'];
|
||||||
|
|
||||||
|
|
|
@ -1764,7 +1764,7 @@ div.admin-panel .description {
|
||||||
/* ----------- media queries ------------------------------- */
|
/* ----------- media queries ------------------------------- */
|
||||||
|
|
||||||
@media all and (min-width: 461px) and (max-width: 900px) {
|
@media all and (min-width: 461px) and (max-width: 900px) {
|
||||||
/* ------------ Header and Menus -------------------------- */
|
/* ------------ Header and Menus -------------------------- */
|
||||||
|
|
||||||
.region-header {
|
.region-header {
|
||||||
margin: .5em 5px .75em;
|
margin: .5em 5px .75em;
|
||||||
|
|
Loading…
Reference in New Issue