diff options
author | prashantsinalkar | 2018-10-08 17:26:15 +0530 |
---|---|---|
committer | prashantsinalkar | 2018-10-08 17:26:15 +0530 |
commit | 04633ed0609b30f1609f46a8da82a802d2d9f763 (patch) | |
tree | fe48b04afbef8d3c7eb2ec1f6778790818f32610 | |
parent | 7931e4a349a80d20990c0b1a9951766241e37eec (diff) | |
download | osdag_workshop_booking-04633ed0609b30f1609f46a8da82a802d2d9f763.tar.gz osdag_workshop_booking-04633ed0609b30f1609f46a8da82a802d2d9f763.tar.bz2 osdag_workshop_booking-04633ed0609b30f1609f46a8da82a802d2d9f763.zip |
added permission
-rw-r--r-- | osdag_workshop_booking.module | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/osdag_workshop_booking.module b/osdag_workshop_booking.module index 9964270..a51eaf7 100644 --- a/osdag_workshop_booking.module +++ b/osdag_workshop_booking.module @@ -14,10 +14,36 @@ function osdag_workshop_booking_menu() 'osdag_workshop_booking_form' ), 'access arguments' => array( - 'workshop booking registration' + 'create workshop proposal' ), 'type' => MENU_NORMAL_ITEM, 'file' => 'workshop_registration.inc' ); return $items; } + +/** + * Implementation of hook_permission(). + */ +function osdag_workshop_booking_permission() +{ + return array( + "create workshop proposal" => array( + "title" => t("Workshop Booking Proposal Form"), + "description" => t("Workshop Booking Proposal Form.") + ), + ); +} + +function osdag_workshop_booking_list_of_states() +{ + $query = db_select('list_states_of_india'); + $query->fields('list_states_of_india'); + //$query->orderBy('', ''); + $states_list = $query->execute(); + while ($states_list_data = $states_list->fetchObject()) + { + $states[$states_list_data->state] = $states_list_data->state; + } //$states_list_data = $states_list->fetchObject() + return $states; +} |