function commons_documents_commons_bw_create_all_widget in Drupal Commons 7.3
Implements hook_commons_bw_create_all_widget().
File
- modules/
commons/ commons_documents/ commons_documents.commons.inc, line 41 - Commons module integration for the Commons Documents module.
Code
function commons_documents_commons_bw_create_all_widget($group) {
if (og_user_access('node', $group->nid, 'create document content')) {
$link = l(t('Create a document'), 'node/add/document', array(
'attributes' => array(
'class' => 'commons-documents-create',
),
'query' => array(
'og_group_ref' => $group->nid,
),
));
return array(
'commons_documents' => array(
'link' => $link,
'text' => t('Share a document'),
'#weight' => 6,
),
);
}
}