{# /** * @file * Contains the text of the field_permission_example explanation/description page * * Available variables: * - admin_link: The translated link pointing to the administer permissions page. */ #} {% set edit_content_types = path('entity.node_type.collection') %} {% trans %}
The Field Permission Example module shows how you can restrict view and edit permissions within your field implementation. It adds a new field type called FieldNote, which appears as a simple text box on the create/edit form, and as a sticky note when viewed. By sticky note, we mean "Post-It note" which is a trademarked term.
To see this field in action, add it to a content type or user profile. Go to the permissions page ({{admin_link}}) and look at the 'Field Permission Example' section. This allows you to change which roles can see and edit FieldNote fields.
Creating different users with different capabilities will let you see these behaviors in action. FieldNote helpfully displays a message telling you which permissions it is trying to resolve for the current field/user combination.
Definitely look through the code to see various implementation details.
{% endtrans %}