None.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/modules/views/src/Plugin/views/argument_validator/None.php
- 8.9.x core/modules/views/src/Plugin/views/cache/None.php
- 8.9.x core/modules/views/src/Plugin/views/access/None.php
- 8.9.x core/modules/views/src/Plugin/views/pager/None.php
- 10 core/modules/views/src/Plugin/views/argument_validator/None.php
- 10 core/modules/views/src/Plugin/views/cache/None.php
- 10 core/modules/views/src/Plugin/views/access/None.php
- 10 core/modules/views/src/Plugin/views/pager/None.php
- 11.x core/modules/views/src/Plugin/views/argument_validator/None.php
- 11.x core/modules/views/src/Plugin/views/cache/None.php
- 11.x core/modules/views/src/Plugin/views/access/None.php
- 11.x core/modules/views/src/Plugin/views/pager/None.php
Namespace
Drupal\views\Plugin\views\accessFile
-
core/
modules/ views/ src/ Plugin/ views/ access/ None.php
View source
<?php
namespace Drupal\views\Plugin\views\access;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\Routing\Route;
/**
* Access plugin that provides no access control at all.
*
* @ingroup views_access_plugins
*
* @ViewsAccess(
* id = "none",
* title = @Translation("Unrestricted"),
* help = @Translation("Will be available to all users.")
* )
*/
class None extends AccessPluginBase {
/**
* {@inheritdoc}
*/
public function summaryTitle() {
return $this->t('Unrestricted');
}
/**
* {@inheritdoc}
*/
public function access(AccountInterface $account) {
// No access control.
return TRUE;
}
/**
* {@inheritdoc}
*/
public function alterRouteDefinition(Route $route) {
$route->setRequirement('_access', 'TRUE');
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
None | Access plugin that provides no access control at all. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.