page_actions.inc 868 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Plugin to handle the 'page_actions' content type which allows the local
  5. * actions template variables to be embedded into a panel.
  6. */
  7. /**
  8. * Plugins are described by creating a $plugin array which will be used
  9. * by the system that includes this file.
  10. */
  11. $plugin = array(
  12. 'title' => t('Actions'),
  13. 'single' => TRUE,
  14. 'icon' => 'icon_page.png',
  15. 'description' => t('Add the action links (local tasks) as content.'),
  16. 'category' => t('Page elements'),
  17. 'render last' => TRUE,
  18. );
  19. /**
  20. * Output function for the 'page_actions' content type.
  21. *
  22. * Outputs the actions (local tasks) of the current page.
  23. */
  24. function ctools_page_actions_content_type_render($subtype, $conf, $panel_args) {
  25. $block = new stdClass();
  26. $block->content = theme('ctools_menu_local_actions_wrapper', array('links' => menu_local_actions()));
  27. return $block;
  28. }