You are here

class None in Drupal 10

Same name in this branch
  1. 10 core/modules/views/src/Plugin/views/access/None.php \Drupal\views\Plugin\views\access\None
  2. 10 core/modules/views/src/Plugin/views/cache/None.php \Drupal\views\Plugin\views\cache\None
  3. 10 core/modules/views/src/Plugin/views/pager/None.php \Drupal\views\Plugin\views\pager\None
  4. 10 core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None
Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None
  2. 9 core/modules/views/src/Plugin/views/argument_validator/None.php \Drupal\views\Plugin\views\argument_validator\None

Do not validate the argument.

Plugin annotation


@ViewsArgumentValidator(
  id = "none",
  title = @Translation(" - Basic validation - ")
)

Hierarchy

  • class \Drupal\views\Plugin\views\argument_validator\None extends \Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase

Expanded class hierarchy of None

27 string references to 'None'
Block::optionsSummary in core/modules/views/src/Plugin/views/display/Block.php
Provide the summary for page options in the views UI.
BreadcrumbTest::testSetLinks in core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php
@covers ::setLinks
CKEditorAdminTest::testExistingFormat in core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
Tests configuring a text editor for an existing text format.
CKEditorAdminTest::testNewFormat in core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
Tests configuring a text editor for a new text format.
ConfigFormTestBase::testConfigForm in core/tests/Drupal/KernelTests/ConfigFormTestBase.php
Submit the system_config_form ensure the configuration has expected values.

... See full list

File

core/modules/views/src/Plugin/views/argument_validator/None.php, line 15

Namespace

Drupal\views\Plugin\views\argument_validator
View source
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']) && !is_numeric($arg)) {
      return FALSE;
    }
    return TRUE;
  }

}

Members