Commit ff71f796 authored by alexpott's avatar alexpott

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

parent 682adb00
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
use Drupal\views\Plugin\views\PluginBase; use Drupal\views\Plugin\views\PluginBase;
use Drupal\views\ViewExecutable;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
/** /**
...@@ -27,29 +26,7 @@ ...@@ -27,29 +26,7 @@
abstract class AccessPluginBase extends PluginBase { abstract class AccessPluginBase extends PluginBase {
/** /**
* Retrieve the options when this is a new access * {@inheritdoc}
* 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.
*/ */
public function summaryTitle() { public function summaryTitle() {
return t('Unknown'); return t('Unknown');
......
...@@ -7,10 +7,7 @@ ...@@ -7,10 +7,7 @@
namespace Drupal\views\Plugin\views\access; namespace Drupal\views\Plugin\views\access;
use Drupal\views\Annotation\ViewsAccess;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
/** /**
...@@ -26,12 +23,15 @@ ...@@ -26,12 +23,15 @@
*/ */
class None extends AccessPluginBase { class None extends AccessPluginBase {
/**
* {@inheritdoc}
*/
public function summaryTitle() { public function summaryTitle() {
return t('Unrestricted'); return t('Unrestricted');
} }
/** /**
* Implements Drupal\views\Plugin\views\access\AccessPluginBase::access(). * {@inheritdoc}
*/ */
public function access(AccountInterface $account) { public function access(AccountInterface $account) {
// No access control. // No access control.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment