You are here

function phantomjs_capture_field_menu in PhantomJS Capture 7

Implements hook_menu().

Adds menu callback to render the node in a given view mode which is used when capturing the entity self.

File

phantomjs_capture_field/phantomjs_capture_field.module, line 37
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_menu() {
  $items = array();

  // @TODO: change to take entity id and node autoload node (%entity)?
  $items['phantomjs/%node/%'] = array(
    'title callback' => 'node_page_title',
    'title arguments' => array(
      1,
    ),
    'page callback' => 'phantomjs_capture_field_view_mode',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'access phantomjs view mode',
    ),
  );
  return $items;
}