Mercurial > hg > cmmr2012-drupal-site
comparison vendor/chi-teck/drupal-code-generator/templates/d7/hook/field_access.twig @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 /** | |
2 * Implements hook_field_access(). | |
3 */ | |
4 function {{ machine_name }}_field_access($op, $field, $entity_type, $entity, $account) { | |
5 if ($field['field_name'] == 'field_of_interest' && $op == 'edit') { | |
6 return user_access('edit field of interest', $account); | |
7 } | |
8 return TRUE; | |
9 } |