You are here

function field_permission_example_theme in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/field_permission_example/field_permission_example.module \field_permission_example_theme()

Implements hook_theme().

Since we have a lot to explain, we're going to use Twig to do it.

File

field_permission_example/field_permission_example.module, line 188
An example field using the Field Types API.

Code

function field_permission_example_theme() {
  return [
    'field_permission_description' => [
      'template' => 'description',
      'variables' => [
        'admin_link' => NULL,
      ],
    ],
  ];
}