Skip to content
Snippets Groups Projects

Resolve #3228881 "Allow plugins to opt-out for a given field"

Files
7
@@ -2,6 +2,7 @@
namespace Drupal\field_permissions\Plugin\FieldPermissionType;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\Session\AccountInterface;
@@ -64,6 +65,13 @@ abstract class Base extends PluginBase implements FieldPermissionTypeInterface,
return $this->pluginDefinition['description'];
}
/**
* {@inheritdoc}
*/
public function appliesToField(FieldDefinitionInterface $field_definition): bool {
return TRUE;
}
/**
* Determines if the given account may view the field, regardless of entity.
*
Loading