You are here

function field_permission_example_theme in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 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

modules/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,
      ],
    ],
  ];
}