function phantomjs_capture_field_permission in PhantomJS Capture 7
Implements hook_permission().
The self entity capture formatter/widget needs to have anonymous access to a view mode menu callback to capture the rendered entity. So this permission have to be set to allow anonymouse access, so it's here to prevent access to content when not using the modules self capture capabilities.
File
- phantomjs_capture_field/
phantomjs_capture_field.module, line 22 - Implements a new field that takes usages of the PhantomJS capture module to allow users to enter an URL and display the screen shot captured as an image on the entity.
Code
function phantomjs_capture_field_permission() {
return array(
'access phantomjs view mode' => array(
'title' => t('PhantomJS view modw'),
'description' => t('Allow access to use the PhantomJS view mode (anonymous need access for the view mode capture to work correctly).'),
),
);
}