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