Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

None.php

Same filename in this branch
  1. 11.1.x core/modules/views/src/Plugin/views/cache/None.php
  2. 11.1.x core/modules/views/src/Plugin/views/pager/None.php
  3. 11.1.x core/modules/views/src/Plugin/views/access/None.php

Namespace

Drupal\views\Plugin\views\argument_validator

File

core/modules/views/src/Plugin/views/argument_validator/None.php

View source
<?php

namespace Drupal\views\Plugin\views\argument_validator;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\views\Attribute\ViewsArgumentValidator;

/**
 * Do not validate the argument.
 *
 * @ingroup views_argument_validate_plugins
 */
class None extends ArgumentValidatorPluginBase {
    public function validateArgument($argument) {
        if (!empty($this->argument->options['must_not_be'])) {
            return !isset($argument);
        }
        if (!isset($argument) || $argument === '') {
            return FALSE;
        }
        if (!empty($this->argument->definition['numeric']) && !isset($this->argument->options['break_phrase'])) {
            return FALSE;
        }
        return TRUE;
    }

}

Classes

Title Deprecated Summary
None Do not validate the argument.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal