X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Fnode_operations.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Fnode_operations.twig;h=d0f2b7a6f68a44f54dd32c61b7a4c7415b4ee6d5;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0000000000000000000000000000000000000000;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/node_operations.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/node_operations.twig new file mode 100644 index 000000000..d0f2b7a6f --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/node_operations.twig @@ -0,0 +1,42 @@ +/** + * Implements hook_node_operations(). + */ +function {{ machine_name }}_node_operations() { + $operations = array( + 'publish' => array( + 'label' => t('Publish selected content'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)), + ), + 'unpublish' => array( + 'label' => t('Unpublish selected content'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)), + ), + 'promote' => array( + 'label' => t('Promote selected content to front page'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)), + ), + 'demote' => array( + 'label' => t('Demote selected content from front page'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)), + ), + 'sticky' => array( + 'label' => t('Make selected content sticky'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)), + ), + 'unsticky' => array( + 'label' => t('Make selected content not sticky'), + 'callback' => 'node_mass_update', + 'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)), + ), + 'delete' => array( + 'label' => t('Delete selected content'), + 'callback' => NULL, + ), + ); + return $operations; +}