You are here

function _publishcontent_get_message in Publish Content 6

Same name and namespace in other branches
  1. 5.2 publishcontent.module \_publishcontent_get_message()
  2. 5 publishcontent.module \_publishcontent_get_message()
  3. 7 publishcontent.module \_publishcontent_get_message()

Helper function to generate user feedback after status toggle.

3 calls to _publishcontent_get_message()
PublishContentWebCaseTest::assert_current_user_can_publish_node in tests/publishcontent.test
PublishContentWebCaseTest::assert_current_user_can_unpublish_node in tests/publishcontent.test
publishcontent_toggle_status in ./publishcontent.module
Menu callback node/%/publish/% and node/%/unpublish/%

File

./publishcontent.module, line 174
Add button to publish or unpublish a node, with access control based on the node type

Code

function _publishcontent_get_message($nid, $title, $status) {
  $status = $status ? t('published') : t('unpublished');
  return t('"@title" [@nid] has been !status', array(
    '@title' => $title,
    '@nid' => $nid,
    '!status' => $status,
  ));
}