Skip to content
Snippets Groups Projects
Commit ff71f796 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2096785 by damiankloip: Clean up Views access plugins.

parent 682adb00
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -9,7 +9,6 @@
use Drupal\Core\Session\AccountInterface;
use Drupal\views\Plugin\views\PluginBase;
use Drupal\views\ViewExecutable;
use Symfony\Component\Routing\Route;
/**
......@@ -27,29 +26,7 @@
abstract class AccessPluginBase extends PluginBase {
/**
* Retrieve the options when this is a new access
* control plugin
*/
protected function defineOptions() { return array(); }
/**
* Provide the default form for setting options.
*/
public function buildOptionsForm(&$form, &$form_state) { }
/**
* Provide the default form form for validating options
*/
public function validateOptionsForm(&$form, &$form_state) { }
/**
* Provide the default form form for submitting options
*/
public function submitOptionsForm(&$form, &$form_state) { }
/**
* Return a string to display as the clickable title for the
* access control.
* {@inheritdoc}
*/
public function summaryTitle() {
return t('Unknown');
......
......@@ -7,10 +7,7 @@
namespace Drupal\views\Plugin\views\access;
use Drupal\views\Annotation\ViewsAccess;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\Routing\Route;
/**
......@@ -26,12 +23,15 @@
*/
class None extends AccessPluginBase {
/**
* {@inheritdoc}
*/
public function summaryTitle() {
return t('Unrestricted');
}
/**
* Implements Drupal\views\Plugin\views\access\AccessPluginBase::access().
* {@inheritdoc}
*/
public function access(AccountInterface $account) {
// No access control.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment