You are here

protected function EntityOperation::isValidConfig in Views Entity Operation Access 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/access/EntityOperation.php \Drupal\veoa\Plugin\views\access\EntityOperation::isValidConfig()

Determine whether configuration is valid.

3 calls to EntityOperation::isValidConfig()
EntityOperation::access in src/Plugin/views/access/EntityOperation.php
All validation done in route. Must be TRUE or controller will render an empty page.
EntityOperation::alterRouteDefinition in src/Plugin/views/access/EntityOperation.php
This method is called when the view is saved.
EntityOperation::summaryTitle in src/Plugin/views/access/EntityOperation.php
Returns the summary of the settings in the display.

File

src/Plugin/views/access/EntityOperation.php, line 165

Class

EntityOperation
Access plugin checking if the current user can operate on an entity.

Namespace

Drupal\veoa\Plugin\views\access

Code

protected function isValidConfig() {
  $entity_types = $this->entityManager
    ->getEntityTypeLabels();
  return !empty($this->options['parameter']) && !empty($this->options['entity_type']) && array_key_exists($this->options['entity_type'], $entity_types) && !empty($this->options['operation']);
}