diff options
Diffstat (limited to 'modules/bhavika')
190 files changed, 7121 insertions, 0 deletions
diff --git a/modules/bhavika/admission_program/admission_program.info.yml b/modules/bhavika/admission_program/admission_program.info.yml new file mode 100644 index 0000000..dcae984 --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.info.yml @@ -0,0 +1,16 @@ +name: admission_program +type: module +description: 'This module is for different programs like ug,pg,etc' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/admission_program/admission_program.install b/modules/bhavika/admission_program/admission_program.install new file mode 100644 index 0000000..d28043c --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function admission_program_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'new'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/admission_program/admission_program.module b/modules/bhavika/admission_program/admission_program.module new file mode 100644 index 0000000..ec48694 --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains admission_program.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function admission_program_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the admission_program module. + case 'help.page.admission_program': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for different programs like ug,pg,etc') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function admission_program_theme() { + return [ + 'admission_program' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/admission_program/admission_program.routing.yml b/modules/bhavika/admission_program/admission_program.routing.yml new file mode 100644 index 0000000..8bab6bc --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.routing.yml @@ -0,0 +1,8 @@ + +admission_program.admission_program_controller_admission_program: + path: '/admission_program' + defaults: + _controller: '\Drupal\admission_program\Controller\AdmissionProgramController::admission_program' + _title: 'Admission Program Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/admission_program/composer.json b/modules/bhavika/admission_program/composer.json new file mode 100644 index 0000000..307177b --- /dev/null +++ b/modules/bhavika/admission_program/composer.json @@ -0,0 +1,13 @@ +{ + "name": "admission_program", + "type": "drupal-module", + "description": "This module is for different programs like ug,pg,etc", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/admission_program", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/admission_program", + "source": "http://cgit.drupalcode.org/admission_program", + }, +} diff --git a/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml b/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml new file mode 100644 index 0000000..fa98799 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml @@ -0,0 +1,129 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.new.body + - field.field.node.new.field_category1 + - field.field.node.new.field_departmentnew + - field.field.node.new.field_intake1 + - field.field.node.new.field_period + - field.field.node.new.field_year_of_starting + - node.type.new + module: + - path + - text + enforced: + module: + - admission_program +id: node.new.default +targetEntityType: node +bundle: new +mode: default +content: + body: + type: text_textarea_with_summary + weight: 121 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_category1: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_departmentnew: + weight: 127 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_intake1: + weight: 124 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_period: + weight: 125 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_year_of_starting: + weight: 126 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml new file mode 100644 index 0000000..435e308 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml @@ -0,0 +1,78 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.new.body + - field.field.node.new.field_category1 + - field.field.node.new.field_departmentnew + - field.field.node.new.field_intake1 + - field.field.node.new.field_period + - field.field.node.new.field_year_of_starting + - node.type.new + module: + - text + - user + enforced: + module: + - admission_program +id: node.new.default +targetEntityType: node +bundle: new +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_category1: + weight: 102 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_departmentnew: + weight: 107 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_intake1: + weight: 104 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_period: + weight: 105 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_year_of_starting: + weight: 106 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml new file mode 100644 index 0000000..337300c --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.new.body + - node.type.new + module: + - text + - user + enforced: + module: + - admission_program +id: node.new.teaser +targetEntityType: node +bundle: new +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml new file mode 100644 index 0000000..c370e60 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.new + module: + - text + enforced: + module: + - admission_program +id: node.new.body +field_name: body +entity_type: node +bundle: new +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml new file mode 100644 index 0000000..9782c3c --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_category1 + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_category1 +field_name: field_category1 +entity_type: node +bundle: new +label: Category +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: { } + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml new file mode 100644 index 0000000..6315697 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_departmentnew + - node.type.department + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_departmentnew +field_name: field_departmentnew +entity_type: node +bundle: new +label: Department +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + department: department + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml new file mode 100644 index 0000000..496524a --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_intake1 + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_intake1 +field_name: field_intake1 +entity_type: node +bundle: new +label: Intake +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml new file mode 100644 index 0000000..2e46f14 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_period + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_period +field_name: field_period +entity_type: node +bundle: new +label: Period +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml new file mode 100644 index 0000000..b38aaa8 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_year_of_starting + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_year_of_starting +field_name: field_year_of_starting +entity_type: node +bundle: new +label: 'year of starting' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml new file mode 100644 index 0000000..777087d --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - taxonomy +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - admission_program +id: node.field_category1 +field_name: field_category1 +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml new file mode 100644 index 0000000..64e4e9e --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + enforced: + module: + - admission_program +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_departmentnew +field_name: field_departmentnew +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml new file mode 100644 index 0000000..ea56a4e --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - admission_program +id: node.field_intake1 +field_name: field_intake1 +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml new file mode 100644 index 0000000..5fe7d64 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - admission_program +id: node.field_period +field_name: field_period +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml new file mode 100644 index 0000000..c912cd9 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + enforced: + module: + - admission_program +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_year_of_starting +field_name: field_year_of_starting +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml b/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml new file mode 100644 index 0000000..e6d69cb --- /dev/null +++ b/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml @@ -0,0 +1,46 @@ +uuid: 0acf77ca-22a7-4526-960a-8be56feadb1d +language: en +migration_group: default +id: course_new +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'course_import' +source: + plugin: csv + path: /var/www/Course/sample.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: new + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_category1: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: category + source: category + field_period: period + field_intake1: intake + field_year_of_starting: year_of_starting + field_departmentnew: + - + plugin: entity_lookup + entity_type: node + bundle: department + source: department +destination: + plugin: 'entity:node' + bundle: new +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/admission_program/config/install/node.type.new.yml b/modules/bhavika/admission_program/config/install/node.type.new.yml new file mode 100644 index 0000000..9a457a3 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/node.type.new.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - admission_program +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Admission_program +type: new +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/admission_program/config/install/views.view.ug.yml b/modules/bhavika/admission_program/config/install/views.view.ug.yml new file mode 100644 index 0000000..6486375 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/views.view.ug.yml @@ -0,0 +1,244 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.new + - taxonomy.vocabulary.category + content: + - 'taxonomy_term:category:97e2c9fe-513e-451b-915a-27bce48fcec9' + module: + - node + - taxonomy + - user + enforced: + module: + - admission_program +id: ug +label: UG +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + row: + type: 'entity:node' + options: + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + group: 1 + type: + id: type + table: node_field_data + field: type + value: + new: new + entity_type: node + entity_field: type + plugin_id: bundle + field_category1_target_id: + id: field_category1_target_id + table: node__field_category1 + field: field_category1_target_id + relationship: none + group_type: group + admin_label: '' + operator: or + value: + 50: 50 + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + type: select + limit: true + vid: category + hierarchy: false + error_message: true + plugin_id: taxonomy_index_tid + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: UG + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: ug + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php b/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php new file mode 100644 index 0000000..d701144 --- /dev/null +++ b/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\admission_program\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class AdmissionProgramController. + */ +class AdmissionProgramController extends ControllerBase { + + /** + * Admission_program. + * + * @return string + * Return Hello string. + */ + public function admission_program() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: admission_program') + ]; + } + +} diff --git a/modules/bhavika/admission_program/templates/admission-program.html.twig b/modules/bhavika/admission_program/templates/admission-program.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/admission_program/templates/admission-program.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php new file mode 100644 index 0000000..3f828c9 --- /dev/null +++ b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\admission_program\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the admission_program module. + */ +class AdmissionProgramControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "admission_program AdmissionProgramController's controller functionality", + 'description' => 'Test Unit for module admission_program and controller AdmissionProgramController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests admission_program functionality. + */ + public function testAdmissionProgramController() { + // Check that the basic functions of module admission_program. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..ff2491f --- /dev/null +++ b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\admission_program\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group admission_program + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['admission_program']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/clubs/clubs.info.yml b/modules/bhavika/clubs/clubs.info.yml new file mode 100644 index 0000000..a705811 --- /dev/null +++ b/modules/bhavika/clubs/clubs.info.yml @@ -0,0 +1,41 @@ +name: 'welcome' +type: module +description: 'this module shows welcome message to logged in user.' +core: 8.x +package: 'Custom' +# dependencies: +# config: +# - field.field.node.clubs.body +# - field.field.node.clubs.field_activity_type +# - field.field.node.clubs.field_contact_no +# - field.field.node.clubs.field_email +# - field.field.node.clubs.field_external_link +# - field.field.node.clubs.field_facebook_link +# - field.field.node.clubs.field_img +# - field.field.node.clubs.field_instagram_link +# - field.field.node.clubs.field_twitter_link +# - field.field.node.clubs.field_youtube_link +# - image.style.thumbnail +# - field.storage.node.field_img +# - node.type.clubs +# - field.storage.node.body +# - field.storage.node.field_activity_type +# - field.storage.node.field_contact_no +# - field.storage.node.field_email +# - field.storage.node.field_external_link +# - field.storage.node.field_facebook_link +# - field.storage.node.field_instagram_link +# - field.storage.node.field_twitter_link +# - field.storage.node.field_youtube_link +# - core.entity_view_mode.node.teaser + +# module: +# - menu_ui +# - image +# - link +# - path +# - text +# - user +# - node +# - taxonomy +# - file diff --git a/modules/bhavika/clubs/clubs.install b/modules/bhavika/clubs/clubs.install new file mode 100644 index 0000000..feb3308 --- /dev/null +++ b/modules/bhavika/clubs/clubs.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function clubs_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'clubs'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/clubs/clubs.module b/modules/bhavika/clubs/clubs.module new file mode 100644 index 0000000..367ac60 --- /dev/null +++ b/modules/bhavika/clubs/clubs.module @@ -0,0 +1,64 @@ +<?php + +/** + * @file + * Contains welcome.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function clubs_form_alter(&$form, &$form_state, $form_id){ + //print_r($form_id); + print_r($form['#view']); + if($form_id == 'node_page_form') + { + + //print_r($form); + + $form['actions']['submit']['#value'] = 'Update'; + // $show= print_r($form,true); + // echo $show; + //echo '<pre>'; + + //echo '</pre>'; + // echo '<pre>'; + // var_dump($form); + // echo '</pre>'; + } + if($form_id == 'system_site_information_settings') + { + // echo '<pre>'; + // print_r($form); + // echo '</pre>'; + $form['site_information']['site_name']['#default_value'] = 'L.D College Of Engineering'; + $form['site_information']['site_mail']['#default_value'] = 'ldce-abad-dte@gujarat.gov.in'; + } +} +function clubs_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the welcome module. + case 'help.page.clubs': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('this module shows welcome message to logged in user.') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function clubs_theme() { + return [ + 'clubs' => [ + 'render element' => 'children', + ], + ]; +} + + diff --git a/modules/bhavika/clubs/clubs.routing.yml b/modules/bhavika/clubs/clubs.routing.yml new file mode 100644 index 0000000..456e2b6 --- /dev/null +++ b/modules/bhavika/clubs/clubs.routing.yml @@ -0,0 +1,8 @@ + +welcome.welcome_controller_welcome: + path: '/welcome' + defaults: + _controller: '\Drupal\welcome\Controller\WelcomeController::welcome' + _title: 'WelcomeController' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/clubs/composer.json b/modules/bhavika/clubs/composer.json new file mode 100644 index 0000000..e544b43 --- /dev/null +++ b/modules/bhavika/clubs/composer.json @@ -0,0 +1,13 @@ +{ + "name": "welcome", + "type": "drupal-module", + "description": "this module shows welcome message to logged in user.", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/welcome", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/welcome", + "source": "http://cgit.drupalcode.org/welcome", + }, +} diff --git a/modules/bhavika/clubs/config/install/core.entity_form_display.node.clubs.default.yml b/modules/bhavika/clubs/config/install/core.entity_form_display.node.clubs.default.yml new file mode 100644 index 0000000..5be3099 --- /dev/null +++ b/modules/bhavika/clubs/config/install/core.entity_form_display.node.clubs.default.yml @@ -0,0 +1,168 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_activity_type + - field.field.node.clubs.field_contact_no + - field.field.node.clubs.field_email + - field.field.node.clubs.field_external_link + - field.field.node.clubs.field_facebook_link + - field.field.node.clubs.field_img + - field.field.node.clubs.field_instagram_link + - field.field.node.clubs.field_twitter_link + - field.field.node.clubs.field_youtube_link + - image.style.thumbnail + - node.type.clubs + module: + - image + - link + - path + - text + enforced: + module: + - clubs +id: node.clubs.default +targetEntityType: node +bundle: clubs +mode: default +content: + body: + type: text_textarea_with_summary + weight: 9 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_activity_type: + weight: 33 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_contact_no: + weight: 27 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_email: + weight: 26 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: email_default + region: content + field_external_link: + weight: 32 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_facebook_link: + weight: 28 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_img: + weight: 8 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_instagram_link: + weight: 30 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_twitter_link: + weight: 29 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_youtube_link: + weight: 31 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.default.yml b/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.default.yml new file mode 100644 index 0000000..25694e4 --- /dev/null +++ b/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.default.yml @@ -0,0 +1,135 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_activity_type + - field.field.node.clubs.field_contact_no + - field.field.node.clubs.field_email + - field.field.node.clubs.field_external_link + - field.field.node.clubs.field_facebook_link + - field.field.node.clubs.field_img + - field.field.node.clubs.field_instagram_link + - field.field.node.clubs.field_twitter_link + - field.field.node.clubs.field_youtube_link + - node.type.clubs + module: + - image + - link + - text + - user + enforced: + module: + - clubs +id: node.clubs.default +targetEntityType: node +bundle: clubs +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_activity_type: + weight: 10 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_contact_no: + weight: 4 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_email: + weight: 3 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_external_link: + weight: 9 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_facebook_link: + weight: 5 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_img: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_instagram_link: + weight: 7 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_twitter_link: + weight: 6 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_youtube_link: + weight: 8 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml b/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml new file mode 100644 index 0000000..5590af0 --- /dev/null +++ b/modules/bhavika/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml @@ -0,0 +1,44 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.clubs.body + - field.field.node.clubs.field_img + - node.type.clubs + module: + - image + - text + - user + enforced: + module: + - clubs +id: node.clubs.teaser +targetEntityType: node +bundle: clubs +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 2 + settings: + trim_length: 600 + third_party_settings: { } + region: content + field_img: + type: image + weight: 1 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.body.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.body.yml new file mode 100644 index 0000000..2cb335e --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.clubs + module: + - text + enforced: + module: + - clubs +id: node.clubs.body +field_name: body +entity_type: node +bundle: clubs +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_activity_type.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_activity_type.yml new file mode 100644 index 0000000..d020e2e --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_activity_type.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_activity_type + - node.type.clubs + enforced: + module: + - clubs +id: node.clubs.field_activity_type +field_name: field_activity_type +entity_type: node +bundle: clubs +label: activity_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: { } +field_type: entity_reference diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_contact_no.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_contact_no.yml new file mode 100644 index 0000000..75c1a61 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_contact_no.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_contact_no + - node.type.clubs + enforced: + module: + - clubs +id: node.clubs.field_contact_no +field_name: field_contact_no +entity_type: node +bundle: clubs +label: contact_no +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_email.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_email.yml new file mode 100644 index 0000000..8f2ac5b --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_email.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_email + - node.type.clubs + enforced: + module: + - clubs +id: node.clubs.field_email +field_name: field_email +entity_type: node +bundle: clubs +label: email +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: email diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_external_link.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_external_link.yml new file mode 100644 index 0000000..d3f123b --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_external_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_external_link + - node.type.clubs + module: + - link + enforced: + module: + - clubs +id: node.clubs.field_external_link +field_name: field_external_link +entity_type: node +bundle: clubs +label: external_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_facebook_link.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_facebook_link.yml new file mode 100644 index 0000000..7f1c33a --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_facebook_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facebook_link + - node.type.clubs + module: + - link + enforced: + module: + - clubs +id: node.clubs.field_facebook_link +field_name: field_facebook_link +entity_type: node +bundle: clubs +label: facebook_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_img.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_img.yml new file mode 100644 index 0000000..2454692 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_img.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_img + - node.type.clubs + module: + - image + enforced: + module: + - clubs +id: node.clubs.field_img +field_name: field_img +entity_type: node +bundle: clubs +label: img +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: clubs + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_instagram_link.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_instagram_link.yml new file mode 100644 index 0000000..fc0f87b --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_instagram_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_instagram_link + - node.type.clubs + module: + - link + enforced: + module: + - clubs +id: node.clubs.field_instagram_link +field_name: field_instagram_link +entity_type: node +bundle: clubs +label: instagram_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_twitter_link.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_twitter_link.yml new file mode 100644 index 0000000..ba25bc9 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_twitter_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_twitter_link + - node.type.clubs + module: + - link + enforced: + module: + - clubs +id: node.clubs.field_twitter_link +field_name: field_twitter_link +entity_type: node +bundle: clubs +label: twitter_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/clubs/config/install/field.field.node.clubs.field_youtube_link.yml b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_youtube_link.yml new file mode 100644 index 0000000..6f4d83f --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.field.node.clubs.field_youtube_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_youtube_link + - node.type.clubs + module: + - link + enforced: + module: + - clubs +id: node.clubs.field_youtube_link +field_name: field_youtube_link +entity_type: node +bundle: clubs +label: youtube_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_activity_type.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_activity_type.yml new file mode 100644 index 0000000..cc17935 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_activity_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - clubs +id: node.field_activity_type +field_name: field_activity_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_contact_no.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_contact_no.yml new file mode 100644 index 0000000..9457294 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_contact_no.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - clubs +id: node.field_contact_no +field_name: field_contact_no +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_email.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_email.yml new file mode 100644 index 0000000..fb0167a --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_email.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - clubs +id: node.field_email +field_name: field_email +entity_type: node +type: email +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_external_link.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_external_link.yml new file mode 100644 index 0000000..52ac0c9 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_external_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - clubs +id: node.field_external_link +field_name: field_external_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_facebook_link.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_facebook_link.yml new file mode 100644 index 0000000..59a4da6 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_facebook_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - clubs +id: node.field_facebook_link +field_name: field_facebook_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_img.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_img.yml new file mode 100644 index 0000000..d63730f --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_img.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - clubs +id: node.field_img +field_name: field_img +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_instagram_link.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_instagram_link.yml new file mode 100644 index 0000000..eef7c10 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_instagram_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - clubs +id: node.field_instagram_link +field_name: field_instagram_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_twitter_link.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_twitter_link.yml new file mode 100644 index 0000000..659af76 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_twitter_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - clubs +id: node.field_twitter_link +field_name: field_twitter_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/field.storage.node.field_youtube_link.yml b/modules/bhavika/clubs/config/install/field.storage.node.field_youtube_link.yml new file mode 100644 index 0000000..d6eebc4 --- /dev/null +++ b/modules/bhavika/clubs/config/install/field.storage.node.field_youtube_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - clubs +id: node.field_youtube_link +field_name: field_youtube_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/clubs/config/install/node.type.clubs.yml b/modules/bhavika/clubs/config/install/node.type.clubs.yml new file mode 100644 index 0000000..e2907ba --- /dev/null +++ b/modules/bhavika/clubs/config/install/node.type.clubs.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - clubs +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Clubs +type: clubs +description: 'Different Clubs and sports clubs Of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/clubs/config/install/views.view.clubs.yml b/modules/bhavika/clubs/config/install/views.view.clubs.yml new file mode 100644 index 0000000..e35c549 --- /dev/null +++ b/modules/bhavika/clubs/config/install/views.view.clubs.yml @@ -0,0 +1,330 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - field.storage.node.field_img + - node.type.clubs + module: + - image + - node + - text + - user + enforced: + module: + - clubs +id: clubs +label: clubs +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: some + options: + items_per_page: 3 + offset: 0 + style: + type: default + row: + type: fields + fields: + title: + id: title + table: node_field_data + field: title + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_img: + id: field_img + table: node__field_img + field: field_img + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: image + settings: + image_style: '' + image_link: content + group_column: '' + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + plugin_id: field + body: + id: body + table: node__body + field: body + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + plugin_id: field + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + group: 1 + type: + id: type + table: node_field_data + field: type + value: + clubs: clubs + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: clubs + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + use_more: true + use_more_always: true + use_more_text: more + link_url: /clubs-page + link_display: custom_url + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.node.body' + - 'config:field.storage.node.field_img' + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.node.body' + - 'config:field.storage.node.field_img' diff --git a/modules/bhavika/clubs/src/Controller/ClubsController.php b/modules/bhavika/clubs/src/Controller/ClubsController.php new file mode 100644 index 0000000..c4c6f5a --- /dev/null +++ b/modules/bhavika/clubs/src/Controller/ClubsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\welcome\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class WelcomeController. + */ +class ClubsController extends ControllerBase { + + /** + * Welcome. + * + * @return string + * Return Hello string. + */ + public function clubs() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: welcome') + ]; + } + +} diff --git a/modules/bhavika/clubs/templates/welcome.html.twig b/modules/bhavika/clubs/templates/welcome.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/clubs/templates/welcome.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/clubs/tests/src/Functional/LoadTest.php b/modules/bhavika/clubs/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..caa6ac0 --- /dev/null +++ b/modules/bhavika/clubs/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\welcome\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group welcome + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['welcome']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/company/company.info.yml b/modules/bhavika/company/company.info.yml new file mode 100644 index 0000000..3132ff7 --- /dev/null +++ b/modules/bhavika/company/company.info.yml @@ -0,0 +1,18 @@ +name: company +type: module +description: 'Company module is for companies content type for placements' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:image + - drupal:link + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/company/company.install b/modules/bhavika/company/company.install new file mode 100644 index 0000000..09b0cb0 --- /dev/null +++ b/modules/bhavika/company/company.install @@ -0,0 +1,64 @@ + +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function company_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'companies'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/company/company.module b/modules/bhavika/company/company.module new file mode 100644 index 0000000..b060f46 --- /dev/null +++ b/modules/bhavika/company/company.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains company.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function company_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the company module. + case 'help.page.company': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Company module is for companies content type for placements') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function company_theme() { + return [ + 'company' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/company/company.routing.yml b/modules/bhavika/company/company.routing.yml new file mode 100644 index 0000000..1997efb --- /dev/null +++ b/modules/bhavika/company/company.routing.yml @@ -0,0 +1,8 @@ + +company.company_controller_company_43: + path: '/company_' + defaults: + _controller: '\Drupal\company\Controller\CompanyController::company' + _title: 'Company Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/company/composer.json b/modules/bhavika/company/composer.json new file mode 100644 index 0000000..4158875 --- /dev/null +++ b/modules/bhavika/company/composer.json @@ -0,0 +1,13 @@ +{ + "name": "company", + "type": "drupal-module", + "description": "Company module is for companies content type for placements", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/company", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/company", + "source": "http://cgit.drupalcode.org/company", + }, +} diff --git a/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml b/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml new file mode 100644 index 0000000..d8dc6ea --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml @@ -0,0 +1,105 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.companies.body + - field.field.node.companies.field_company_link + - field.field.node.companies.field_logo + - image.style.thumbnail + - node.type.companies + module: + - image + - link + - path + - text + enforced: + module: + - company +id: node.companies.default +targetEntityType: node +bundle: companies +mode: default +content: + body: + type: text_textarea_with_summary + weight: 9 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_company_link: + weight: 10 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_logo: + weight: 8 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml new file mode 100644 index 0000000..0f620cf --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.companies.body + - field.field.node.companies.field_company_link + - field.field.node.companies.field_logo + - node.type.companies + module: + - image + - link + - text + - user + enforced: + module: + - company +id: node.companies.default +targetEntityType: node +bundle: companies +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_company_link: + weight: 3 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_logo: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml new file mode 100644 index 0000000..8a0b84a --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.companies.body + - node.type.companies + module: + - text + - user + enforced: + module: + - company +id: node.companies.teaser +targetEntityType: node +bundle: companies +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..6114f1f --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - company +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/company/config/install/field.field.node.companies.body.yml b/modules/bhavika/company/config/install/field.field.node.companies.body.yml new file mode 100644 index 0000000..47c8791 --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.companies + module: + - text + enforced: + module: + - company +id: node.companies.body +field_name: body +entity_type: node +bundle: companies +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml b/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml new file mode 100644 index 0000000..f10a0ea --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_link + - node.type.companies + module: + - link + enforced: + module: + - company +id: node.companies.field_company_link +field_name: field_company_link +entity_type: node +bundle: companies +label: company_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml b/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml new file mode 100644 index 0000000..f1df5b8 --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_logo + - node.type.companies + module: + - image + enforced: + module: + - company +id: node.companies.field_logo +field_name: field_logo +entity_type: node +bundle: companies +label: logo +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: company + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/company/config/install/field.storage.node.body.yml b/modules/bhavika/company/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..e9f95b6 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text + enforced: + module: + - company +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml b/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml new file mode 100644 index 0000000..e5072b2 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - company +id: node.field_company_link +field_name: field_company_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/company/config/install/field.storage.node.field_logo.yml b/modules/bhavika/company/config/install/field.storage.node.field_logo.yml new file mode 100644 index 0000000..a62c720 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.field_logo.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node +# third_party_settings: +# field_permissions: +# permission_type: public +enforced: + module: + - company +id: node.field_logo +field_name: field_logo +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/company/config/install/image.style.thumbnail.yml b/modules/bhavika/company/config/install/image.style.thumbnail.yml new file mode 100644 index 0000000..946d0cd --- /dev/null +++ b/modules/bhavika/company/config/install/image.style.thumbnail.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - company +name: thumbnail +label: 'Thumbnail (100×100)' +effects: + 1cfec298-8620-4749-b100-ccb6c4500779: + uuid: 1cfec298-8620-4749-b100-ccb6c4500779 + id: image_scale + weight: 0 + data: + width: 100 + height: 100 + upscale: false diff --git a/modules/bhavika/company/config/install/migrate_plus.migration.company_import.yml b/modules/bhavika/company/config/install/migrate_plus.migration.company_import.yml new file mode 100644 index 0000000..25ebd55 --- /dev/null +++ b/modules/bhavika/company/config/install/migrate_plus.migration.company_import.yml @@ -0,0 +1,50 @@ +uuid: 1141ae0c-c5ac-4b8a-87a0-5a42d2504519 +language: en +migration_group: default +id: company_import +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'company_import' +source: + plugin: csv + path: /var/www/companies/csv files/company.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/companies/images + file_dest: 'public://company/' +process: + type: + plugin: default_value + default_value: companies + source_path: + - + plugin: skip_on_empty + method: process + source: logo + - + plugin: concat + delimiter: / + source: + - constants/file_source + - logo + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_company_link: link + field_logo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: companies +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/company/config/install/node.type.companies.yml b/modules/bhavika/company/config/install/node.type.companies.yml new file mode 100644 index 0000000..7552b9e --- /dev/null +++ b/modules/bhavika/company/config/install/node.type.companies.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - company +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Companies +type: companies +description: 'This is the content template for the various companies that visit L.D.C.E for Placements.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/company/src/Controller/CompanyController.php b/modules/bhavika/company/src/Controller/CompanyController.php new file mode 100644 index 0000000..3d0956d --- /dev/null +++ b/modules/bhavika/company/src/Controller/CompanyController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\company\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class CompanyController. + */ +class CompanyController extends ControllerBase { + + /** + * Company. + * + * @return string + * Return Hello string. + */ + public function company() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: company') + ]; + } + +} diff --git a/modules/bhavika/company/templates/company.html.twig b/modules/bhavika/company/templates/company.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/company/templates/company.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/company/tests/Controller/CompanyControllerTest.php b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php new file mode 100644 index 0000000..66debed --- /dev/null +++ b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\company\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the company module. + */ +class CompanyControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "company CompanyController's controller functionality", + 'description' => 'Test Unit for module company and controller CompanyController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests company functionality. + */ + public function testCompanyController() { + // Check that the basic functions of module company. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/company/tests/src/Functional/LoadTest.php b/modules/bhavika/company/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..15e82ca --- /dev/null +++ b/modules/bhavika/company/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\company\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group company + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['company']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/department/composer.json b/modules/bhavika/department/composer.json new file mode 100644 index 0000000..a25a506 --- /dev/null +++ b/modules/bhavika/department/composer.json @@ -0,0 +1,13 @@ +{ + "name": "department", + "type": "drupal-module", + "description": "Department module is for department content type", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/department", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/department", + "source": "http://cgit.drupalcode.org/department", + }, +} diff --git a/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml b/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml new file mode 100644 index 0000000..bfaccb6 --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml @@ -0,0 +1,125 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - field.field.node.department.field_dept_image + - field.field.node.department.field_dept_mission + - field.field.node.department.field_facilities + - field.field.node.department.field_placements + - image.style.thumbnail + - node.type.department + module: + - image + - path + - text + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_dept_image: + weight: 9 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_dept_mission: + weight: 12 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_facilities: + weight: 10 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_placements: + weight: 13 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml b/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml new file mode 100644 index 0000000..cfff6fc --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - field.field.node.department.field_dept_image + - field.field.node.department.field_dept_mission + - field.field.node.department.field_facilities + - field.field.node.department.field_placements + - node.type.department + module: + - image + - text + - user + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_dept_image: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_dept_mission: + weight: 5 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_facilities: + weight: 3 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_placements: + weight: 6 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml b/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml new file mode 100644 index 0000000..28c59d7 --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.department.body + - node.type.department + module: + - text + - user + enforced: + module: + - department +id: node.department.teaser +targetEntityType: node +bundle: department +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..22f411b --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - department +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/department/config/install/field.field.node.department.body.yml b/modules/bhavika/department/config/install/field.field.node.department.body.yml new file mode 100644 index 0000000..fb7688f --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.body +field_name: body +entity_type: node +bundle: department +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml b/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml new file mode 100644 index 0000000..02ffffd --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_dept_image + - node.type.department + module: + - image + enforced: + module: + - department +id: node.department.field_dept_image +field_name: field_dept_image +entity_type: node +bundle: department +label: dept_image +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: department + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml b/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml new file mode 100644 index 0000000..a49ab2d --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_dept_mission + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.field_dept_mission +field_name: field_dept_mission +entity_type: node +bundle: department +label: dept_mission +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml b/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml new file mode 100644 index 0000000..24c2776 --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facilities + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.field_facilities +field_name: field_facilities +entity_type: node +bundle: department +label: facilities +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml b/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml new file mode 100644 index 0000000..b242908 --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_placements + - node.type.companies + - node.type.department + enforced: + module: + - department + - company +id: node.department.field_placements +field_name: field_placements +entity_type: node +bundle: department +label: placements +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + companies: companies + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/department/config/install/field.storage.node.body.yml b/modules/bhavika/department/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..1d190e7 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - department +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml b/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml new file mode 100644 index 0000000..23ef815 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - department +id: node.field_dept_image +field_name: field_dept_image +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml b/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml new file mode 100644 index 0000000..031ec1f --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - department +id: node.field_dept_mission +field_name: field_dept_mission +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml b/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml new file mode 100644 index 0000000..3900da7 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - department +id: node.field_facilities +field_name: field_facilities +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_placements.yml b/modules/bhavika/department/config/install/field.storage.node.field_placements.yml new file mode 100644 index 0000000..42483fb --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_placements.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - department +id: node.field_placements +field_name: field_placements +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/image.style.thumbnail.yml b/modules/bhavika/department/config/install/image.style.thumbnail.yml new file mode 100644 index 0000000..2eda95b --- /dev/null +++ b/modules/bhavika/department/config/install/image.style.thumbnail.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - department +name: thumbnail +label: 'Thumbnail (100×100)' +effects: + 1cfec298-8620-4749-b100-ccb6c4500779: + uuid: 1cfec298-8620-4749-b100-ccb6c4500779 + id: image_scale + weight: 0 + data: + width: 100 + height: 100 + upscale: false diff --git a/modules/bhavika/department/config/install/migrate_plus.migration.department_import.yml b/modules/bhavika/department/config/install/migrate_plus.migration.department_import.yml new file mode 100644 index 0000000..a4d03ca --- /dev/null +++ b/modules/bhavika/department/config/install/migrate_plus.migration.department_import.yml @@ -0,0 +1,57 @@ +uuid: 5ce25402-34a6-46ee-aeef-3920e2cd0cb6 +language: en +migration_group: default +id: department_import +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'department_import' +source: + plugin: csv + path: /var/www/Department/csv files/department.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/Department/image + file_dest: 'public://department/' +process: + type: + plugin: default_value + default_value: department + source_path: + - + plugin: skip_on_empty + method: process + source: img + - + plugin: concat + delimiter: / + source: + - constants/file_source + - img + title: title + body/value: body + body/format: + plugin: default_value + default_value: full_html + field_dept_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_dept_mission: mission + field_facilities/value: facilities + field_placements: + - + plugin: entity_lookup + entity_type: node + bundle: companies + source: placements +destination: + plugin: 'entity:node' + bundle: department +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/department/config/install/node.type.companies.yml b/modules/bhavika/department/config/install/node.type.companies.yml new file mode 100644 index 0000000..6c8b80c --- /dev/null +++ b/modules/bhavika/department/config/install/node.type.companies.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - department +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Companies +type: companies +description: 'This is the content template for the various companies that visit L.D.C.E for Placements.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/department/config/install/node.type.department.yml b/modules/bhavika/department/config/install/node.type.department.yml new file mode 100644 index 0000000..4337ba1 --- /dev/null +++ b/modules/bhavika/department/config/install/node.type.department.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - department +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Department +type: department +description: 'This content type provides the information about the various department of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/department/config/install/views.view.department.yml b/modules/bhavika/department/config/install/views.view.department.yml new file mode 100644 index 0000000..d38509a --- /dev/null +++ b/modules/bhavika/department/config/install/views.view.department.yml @@ -0,0 +1,194 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.department + module: + - node + - user + enforced: + module: + - department +id: department +label: Department +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 8 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + row: + type: 'entity:node' + options: + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + group: 1 + type: + id: type + table: node_field_data + field: type + value: + department: department + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: Department + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: department + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/modules/bhavika/department/department.info.yml b/modules/bhavika/department/department.info.yml new file mode 100644 index 0000000..50cb4df --- /dev/null +++ b/modules/bhavika/department/department.info.yml @@ -0,0 +1,18 @@ +name: department +type: module +description: 'Department module is for department content type' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:image + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - drupal:file + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/department/department.install b/modules/bhavika/department/department.install new file mode 100644 index 0000000..7ea1cea --- /dev/null +++ b/modules/bhavika/department/department.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function department_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'department'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/department/department.module b/modules/bhavika/department/department.module new file mode 100644 index 0000000..5d0dd00 --- /dev/null +++ b/modules/bhavika/department/department.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains department.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function department_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the department module. + case 'help.page.department': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Department module is for department content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function department_theme() { + return [ + 'department' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/department/department.routing.yml b/modules/bhavika/department/department.routing.yml new file mode 100644 index 0000000..37f6dea --- /dev/null +++ b/modules/bhavika/department/department.routing.yml @@ -0,0 +1,8 @@ + +department.department_controller_department: + path: '/department_' + defaults: + _controller: '\Drupal\department\Controller\DepartmentController::department' + _title: 'Department Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/department/src/Controller/DepartmentController.php b/modules/bhavika/department/src/Controller/DepartmentController.php new file mode 100644 index 0000000..58741f3 --- /dev/null +++ b/modules/bhavika/department/src/Controller/DepartmentController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\department\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class DepartmentController. + */ +class DepartmentController extends ControllerBase { + + /** + * Department. + * + * @return string + * Return Hello string. + */ + public function department() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: department') + ]; + } + +} diff --git a/modules/bhavika/department/templates/department.html.twig b/modules/bhavika/department/templates/department.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/department/templates/department.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php b/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php new file mode 100644 index 0000000..8d7a0be --- /dev/null +++ b/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\department\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the department module. + */ +class DepartmentControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "department DepartmentController's controller functionality", + 'description' => 'Test Unit for module department and controller DepartmentController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests department functionality. + */ + public function testDepartmentController() { + // Check that the basic functions of module department. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/department/tests/src/Functional/LoadTest.php b/modules/bhavika/department/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..423abc0 --- /dev/null +++ b/modules/bhavika/department/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\department\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group department + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['department']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json b/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json new file mode 100644 index 0000000..8ba55be --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json @@ -0,0 +1,13 @@ +{ + "name": "l_d_c_e_imp_pdf_links", + "type": "drupal-module", + "description": "This module is for important links that will be provided on site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/l_d_c_e_imp_pdf_links", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/l_d_c_e_imp_pdf_links", + "source": "http://cgit.drupalcode.org/l_d_c_e_imp_pdf_links", + }, +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml new file mode 100644 index 0000000..92cc86f --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml @@ -0,0 +1,108 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.l_d_c_e_imp_pdf_links.body + - field.field.node.l_d_c_e_imp_pdf_links.field_file_type + - field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + module: + - paragraphs + - path + - text + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.default +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: default +content: + body: + weight: 124 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_file_type: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_pdf_file_para: + type: entity_reference_paragraphs + weight: 123 + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + third_party_settings: { } + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml new file mode 100644 index 0000000..7ec2eb7 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml @@ -0,0 +1,37 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.l_d_c_e_imp_pdf_links.body + - field.field.node.l_d_c_e_imp_pdf_links.field_file_type + - field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + module: + - entity_reference_revisions + - user + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.default +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: default +content: + field_pdf_file_para: + type: entity_reference_revisions_entity_view + weight: 1 + label: hidden + settings: + view_mode: default + link: '' + third_party_settings: { } + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + body: true + field_file_type: true + langcode: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml new file mode 100644 index 0000000..ee2b957 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.l_d_c_e_imp_pdf_links + module: + - user + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.teaser +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml new file mode 100644 index 0000000..e7d68ec --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.l_d_c_e_imp_pdf_links + module: + - text + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.body +field_name: body +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml new file mode 100644 index 0000000..d492e4b --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_file_type + - node.type.l_d_c_e_imp_pdf_links + - taxonomy.vocabulary.academics_category + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.field_file_type +field_name: field_file_type +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: file_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + academics_category: academics_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml new file mode 100644 index 0000000..63b18af --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + - paragraphs.paragraphs_type.imp_links + module: + - entity_reference_revisions + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.field_pdf_file_para +field_name: field_pdf_file_para +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: pdf_file_para +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + imp_links: imp_links + target_bundles_drag_drop: + imp_links: + enabled: true + weight: 3 + r_d_projects: + weight: 4 + enabled: false +field_type: entity_reference_revisions diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml new file mode 100644 index 0000000..bacb030 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.field_file_type +field_name: field_file_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml new file mode 100644 index 0000000..19bf2a6 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + module: + - entity_reference_revisions + - node + - paragraphs + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.field_pdf_file_para +field_name: field_pdf_file_para +entity_type: node +type: entity_reference_revisions +settings: + target_type: paragraph +module: entity_reference_revisions +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml new file mode 100644 index 0000000..1dd7631 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - l_d_c_e_imp_pdf_links +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'L.D.C.E imp PDF Links' +type: l_d_c_e_imp_pdf_links +description: 'This content type provides template for the representation of various useful links of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml new file mode 100644 index 0000000..20bc8a3 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - l_d_c_e_imp_pdf_links +id: imp_links +label: imp_links +icon_uuid: null +description: '' +behavior_plugins: { } diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml new file mode 100644 index 0000000..186be64 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - l_d_c_e_imp_pdf_links +name: 'academics category' +vid: academics_category +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/views.view.imp_pdf_links.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/views.view.imp_pdf_links.yml new file mode 100644 index 0000000..da8d57e --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/views.view.imp_pdf_links.yml @@ -0,0 +1,195 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.l_d_c_e_imp_pdf_links + module: + - node + - user + enforced: + module: + - l_d_c_e_imp_pdf_links +id: imp_pdf_links +label: 'imp pdf links' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 7 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + row: + type: 'entity:node' + options: + relationship: none + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + group: 1 + type: + id: type + table: node_field_data + field: type + value: + l_d_c_e_imp_pdf_links: l_d_c_e_imp_pdf_links + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: 'imp pdf links' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: imp-pdf-links + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml new file mode 100644 index 0000000..d7d613b --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml @@ -0,0 +1,18 @@ +name: l_d_c_e_imp_pdf_links +type: module +description: 'This module is for important links that will be provided on site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:paragraphs + - drupal:entity_reference_revisions + - drupal:text + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install new file mode 100644 index 0000000..3f81231 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function l_d_c_e_imp_pdf_links_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'l_d_c_e_imp_pdf_links'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module new file mode 100644 index 0000000..82a0bbb --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains l_d_c_e_imp_pdf_links.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function l_d_c_e_imp_pdf_links_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the l_d_c_e_imp_pdf_links module. + case 'help.page.l_d_c_e_imp_pdf_links': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for important links that will be provided on site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function l_d_c_e_imp_pdf_links_theme() { + return [ + 'l_d_c_e_imp_pdf_links' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml new file mode 100644 index 0000000..da34b86 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml @@ -0,0 +1,8 @@ + +l_d_c_e_imp_pdf_links.pdf_links_controller_ldce_imp_pdf_links: + path: '/l_d_c_e_imp_pdf_links' + defaults: + _controller: '\Drupal\l_d_c_e_imp_pdf_links\Controller\PdfLinksController::ldce_imp_pdf_links' + _title: 'LDCE Link Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php b/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php new file mode 100644 index 0000000..20ed573 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\l_d_c_e_imp_pdf_links\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class PdfLinksController. + */ +class PdfLinksController extends ControllerBase { + + /** + * Ldce_imp_pdf_links. + * + * @return string + * Return Hello string. + */ + public function ldce_imp_pdf_links() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: ldce_imp_pdf_links') + ]; + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig b/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php new file mode 100644 index 0000000..8a4bfe1 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\l_d_c_e_imp_pdf_links\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the l_d_c_e_imp_pdf_links module. + */ +class PdfLinksControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "l_d_c_e_imp_pdf_links PdfLinksController's controller functionality", + 'description' => 'Test Unit for module l_d_c_e_imp_pdf_links and controller PdfLinksController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests l_d_c_e_imp_pdf_links functionality. + */ + public function testPdfLinksController() { + // Check that the basic functions of module l_d_c_e_imp_pdf_links. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..a5cf71d --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\l_d_c_e_imp_pdf_links\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group l_d_c_e_imp_pdf_links + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['l_d_c_e_imp_pdf_links']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/legal_forms/composer.json b/modules/bhavika/legal_forms/composer.json new file mode 100644 index 0000000..ff7c339 --- /dev/null +++ b/modules/bhavika/legal_forms/composer.json @@ -0,0 +1,13 @@ +{ + "name": "legal_forms", + "type": "drupal-module", + "description": "Legal forms module is for various legal forms of site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/legal_forms", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/legal_forms", + "source": "http://cgit.drupalcode.org/legal_forms", + }, +} diff --git a/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml new file mode 100644 index 0000000..bd22038 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml @@ -0,0 +1,103 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - path + - text + enforced: + module: + -legal_forms +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_form_type: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + field_pdf_file: + weight: 8 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml new file mode 100644 index 0000000..f7d793b --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml @@ -0,0 +1,43 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - text + - user + enforced: + module: + -legal_forms +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 2 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_pdf_file: + weight: 1 + label: hidden + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_form_type: true + langcode: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml new file mode 100644 index 0000000..631d77d --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - user + enforced: + module: + -legal_forms +id: node.legal_forms.teaser +targetEntityType: node +bundle: legal_forms +mode: teaser +content: { } +hidden: + field_form_type: true + field_pdf_file: true + langcode: true + links: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml new file mode 100644 index 0000000..5b92a0b --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml @@ -0,0 +1,16 @@ +langcode: en +status: true +dependencies: + config: + - taxonomy.vocabulary.legal_forms + enforced: + module: + -legal_forms +id: taxonomy_term.legal_forms.default +targetEntityType: taxonomy_term +bundle: legal_forms +mode: default +content: { } +hidden: + description: true + langcode: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..8935f55 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + -legal_forms +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml new file mode 100644 index 0000000..f0007d4 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.legal_forms + module: + - text + enforced: + module: + -legal_forms +id: node.legal_forms.body +field_name: body +entity_type: node +bundle: legal_forms +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml new file mode 100644 index 0000000..f124463 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_form_type + - node.type.legal_forms + - taxonomy.vocabulary.legal_forms + enforced: + module: + -legal_forms +id: node.legal_forms.field_form_type +field_name: field_form_type +entity_type: node +bundle: legal_forms +label: form_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + legal_forms: legal_forms + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: academics_category +field_type: entity_reference diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml new file mode 100644 index 0000000..3903ebf --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file + - node.type.legal_forms + module: + - file + enforced: + module: + -legal_forms +id: node.legal_forms.field_pdf_file +field_name: field_pdf_file +entity_type: node +bundle: legal_forms +label: pdf_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: pdf_files_lf + file_extensions: 'txt pdf jpg png zip' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..7a1b3a3 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + -legal_forms +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml new file mode 100644 index 0000000..ce581b6 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + -legal_forms +id: node.field_form_type +field_name: field_form_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml new file mode 100644 index 0000000..ea2949c --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - node + enforced: + module: + -legal_forms +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_pdf_file +field_name: field_pdf_file +entity_type: node +type: file +settings: + display_field: false + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml b/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml new file mode 100644 index 0000000..48507e3 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml @@ -0,0 +1,57 @@ +uuid: 5098d90e-b0d2-4895-9643-c1c6f62ab657 +language: en +migration_group: default +id: legal_forms_import +label: 'legal_forms_import' +source: + plugin: csv + path: /var/www/legal forms/csv/legal_forms.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/legal forms/files + file_dest: 'public://pdf_files_lf/' +process: + type: + plugin: default_value + default_value: legal_forms + source_path: + - + plugin: skip_on_empty + method: process + source: files + - + plugin: concat + delimiter: / + source: + - constants/file_source + - files + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_form_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: legal_forms + source: form_type + field_pdf_file: + - + plugin: explode + delimiter: ',' + source: files + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: legal_forms +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml b/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml new file mode 100644 index 0000000..2935757 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + -legal_forms +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Legal Forms' +type: legal_forms +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml b/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml new file mode 100644 index 0000000..73217ee --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + -legal_forms +name: legal_forms +vid: legal_forms +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/legal_forms/legal_forms.info.yml b/modules/bhavika/legal_forms/legal_forms.info.yml new file mode 100644 index 0000000..290a389 --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.info.yml @@ -0,0 +1,17 @@ +name: legal_forms +type: module +description: 'Legal forms module is for various legal forms of site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - drupal:file + # - ds:ds + # - pathauto:pathauto + diff --git a/modules/bhavika/legal_forms/legal_forms.module b/modules/bhavika/legal_forms/legal_forms.module new file mode 100644 index 0000000..b4d6b12 --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains legal_forms.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function legal_forms_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the legal_forms module. + case 'help.page.legal_forms': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Legal forms module is for various legal forms of site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function legal_forms_theme() { + return [ + 'legal_forms' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/legal_forms/legal_forms.routing.yml b/modules/bhavika/legal_forms/legal_forms.routing.yml new file mode 100644 index 0000000..fdae3eb --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.routing.yml @@ -0,0 +1,8 @@ + +legal_forms.legal_forms_controller_legal_forms: + path: '/legal_forms' + defaults: + _controller: '\Drupal\legal_forms\Controller\LegalFormsController::legal_forms' + _title: 'Legal Forms Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php b/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php new file mode 100644 index 0000000..65829c6 --- /dev/null +++ b/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\legal_forms\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class LegalFormsController. + */ +class LegalFormsController extends ControllerBase { + + /** + * Legal_forms. + * + * @return string + * Return Hello string. + */ + public function legal_forms() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: legal_forms') + ]; + } + +} diff --git a/modules/bhavika/legal_forms/templates/legal-forms.html.twig b/modules/bhavika/legal_forms/templates/legal-forms.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/legal_forms/templates/legal-forms.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php b/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php new file mode 100644 index 0000000..c99135a --- /dev/null +++ b/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\legal_forms\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the legal_forms module. + */ +class LegalFormsControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "legal_forms LegalFormsController's controller functionality", + 'description' => 'Test Unit for module legal_forms and controller LegalFormsController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests legal_forms functionality. + */ + public function testLegalFormsController() { + // Check that the basic functions of module legal_forms. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php b/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..23c5583 --- /dev/null +++ b/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\legal_forms\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group legal_forms + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['legal_forms']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/legal_forms1/composer.json b/modules/bhavika/legal_forms1/composer.json new file mode 100644 index 0000000..f9a3de8 --- /dev/null +++ b/modules/bhavika/legal_forms1/composer.json @@ -0,0 +1,13 @@ +{ + "name": "legal_forms1", + "type": "drupal-module", + "description": "Legal forms is module for forms of site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/legal_forms1", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/legal_forms1", + "source": "http://cgit.drupalcode.org/legal_forms1", + }, +} diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml new file mode 100644 index 0000000..0a931fe --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml @@ -0,0 +1,103 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - path + - text + enforced: + module: + - legal_forms1 +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_form_type: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + field_pdf_file: + weight: 8 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml new file mode 100644 index 0000000..98a37b8 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml @@ -0,0 +1,43 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - text + - user + enforced: + module: + - legal_forms1 +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 2 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_pdf_file: + weight: 1 + label: hidden + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_form_type: true + langcode: true diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml new file mode 100644 index 0000000..7bcb82f --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - user + enforced: + module: + - legal_forms1 +id: node.legal_forms.teaser +targetEntityType: node +bundle: legal_forms +mode: teaser +content: { } +hidden: + field_form_type: true + field_pdf_file: true + langcode: true + links: true diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml new file mode 100644 index 0000000..ecdeb34 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml @@ -0,0 +1,16 @@ +langcode: en +status: true +dependencies: + config: + - taxonomy.vocabulary.legal_forms + enforced: + module: + - legal_forms1 +id: taxonomy_term.legal_forms.default +targetEntityType: taxonomy_term +bundle: legal_forms +mode: default +content: { } +hidden: + description: true + langcode: true diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml new file mode 100644 index 0000000..ca37815 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.legal_forms + module: + - text + enforced: + module: + - legal_forms1 +id: node.legal_forms.body +field_name: body +entity_type: node +bundle: legal_forms +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml new file mode 100644 index 0000000..f07a9df --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_form_type + - node.type.legal_forms + - taxonomy.vocabulary.legal_forms + enforced: + module: + - legal_forms1 +id: node.legal_forms.field_form_type +field_name: field_form_type +entity_type: node +bundle: legal_forms +label: form_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + legal_forms: legal_forms + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: academics_category +field_type: entity_reference diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml new file mode 100644 index 0000000..8a4bfd2 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file + - node.type.legal_forms + module: + - file + enforced: + module: + - legal_forms1 +id: node.legal_forms.field_pdf_file +field_name: field_pdf_file +entity_type: node +bundle: legal_forms +label: pdf_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: pdf_files_lf + file_extensions: 'txt pdf jpg png zip' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml new file mode 100644 index 0000000..2b6d88d --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - legal_forms1 +id: node.field_form_type +field_name: field_form_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml new file mode 100644 index 0000000..bacd3db --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - node + enforced: + module: + - legal_forms1 +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_pdf_file +field_name: field_pdf_file +entity_type: node +type: file +settings: + display_field: false + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml b/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml new file mode 100644 index 0000000..48507e3 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml @@ -0,0 +1,57 @@ +uuid: 5098d90e-b0d2-4895-9643-c1c6f62ab657 +language: en +migration_group: default +id: legal_forms_import +label: 'legal_forms_import' +source: + plugin: csv + path: /var/www/legal forms/csv/legal_forms.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/legal forms/files + file_dest: 'public://pdf_files_lf/' +process: + type: + plugin: default_value + default_value: legal_forms + source_path: + - + plugin: skip_on_empty + method: process + source: files + - + plugin: concat + delimiter: / + source: + - constants/file_source + - files + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_form_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: legal_forms + source: form_type + field_pdf_file: + - + plugin: explode + delimiter: ',' + source: files + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: legal_forms +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml b/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml new file mode 100644 index 0000000..0b37dcb --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - legal_forms1 +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Legal Forms' +type: legal_forms +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml b/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml new file mode 100644 index 0000000..637fa3c --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: { } +name: legal_forms +vid: legal_forms +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/legal_forms1/legal_forms1.info.yml b/modules/bhavika/legal_forms1/legal_forms1.info.yml new file mode 100644 index 0000000..9ab3562 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.info.yml @@ -0,0 +1,17 @@ +name: legal_forms1 +type: module +description: 'Legal forms is module for forms of site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/legal_forms1/legal_forms1.install b/modules/bhavika/legal_forms1/legal_forms1.install new file mode 100644 index 0000000..794dd6f --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function legal_forms1_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'legal_forms'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/legal_forms1/legal_forms1.module b/modules/bhavika/legal_forms1/legal_forms1.module new file mode 100644 index 0000000..b3621f3 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains legal_forms1.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function legal_forms1_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the legal_forms1 module. + case 'help.page.legal_forms1': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Legal forms is module for forms of site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function legal_forms1_theme() { + return [ + 'legal_forms1' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/legal_forms1/legal_forms1.routing.yml b/modules/bhavika/legal_forms1/legal_forms1.routing.yml new file mode 100644 index 0000000..6007e60 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.routing.yml @@ -0,0 +1,8 @@ + +legal_forms1.legal_forms_controller_legalforms: + path: '/legal_forms1' + defaults: + _controller: '\Drupal\legal_forms1\Controller\LegalFormsController::legalforms' + _title: 'legalforms' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php b/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php new file mode 100644 index 0000000..4f74371 --- /dev/null +++ b/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\legal_forms1\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class LegalFormsController. + */ +class LegalFormsController extends ControllerBase { + + /** + * Legalforms. + * + * @return string + * Return Hello string. + */ + public function legalforms() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: legalforms') + ]; + } + +} diff --git a/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig b/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php b/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php new file mode 100644 index 0000000..37eb9ce --- /dev/null +++ b/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\legal_forms1\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the legal_forms1 module. + */ +class LegalFormsControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "legal_forms1 LegalFormsController's controller functionality", + 'description' => 'Test Unit for module legal_forms1 and controller LegalFormsController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests legal_forms1 functionality. + */ + public function testLegalFormsController() { + // Check that the basic functions of module legal_forms1. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php b/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..530fa33 --- /dev/null +++ b/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\legal_forms1\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group legal_forms1 + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['legal_forms1']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/photo_gallery/composer.json b/modules/bhavika/photo_gallery/composer.json new file mode 100644 index 0000000..4e0d603 --- /dev/null +++ b/modules/bhavika/photo_gallery/composer.json @@ -0,0 +1,13 @@ +{ + "name": "photo_gallery", + "type": "drupal-module", + "description": "This module is for various pictures uploaded on site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/photo_gallery", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/photo_gallery", + "source": "http://cgit.drupalcode.org/photo_gallery", + }, +} diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml b/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml new file mode 100644 index 0000000..494750a --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml @@ -0,0 +1,52 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.photo_gallery.body + - field.field.node.photo_gallery.field_photo_gallery_img + - image.style.thumbnail + - node.type.photo_gallery + module: + - image + - text + enforced: + module: + - photo_gallery +id: node.photo_gallery.default +targetEntityType: node +bundle: photo_gallery +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_photo_gallery_img: + weight: 1 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + langcode: true + path: true + promote: true + status: true + sticky: true + uid: true diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml new file mode 100644 index 0000000..6cf56ae --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml @@ -0,0 +1,68 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.photo_gallery.body + - field.field.node.photo_gallery.field_photo_gallery_img + - node.type.photo_gallery + module: + - ds + - image + - text + - user + enforced: + module: + - photo_gallery +id: node.photo_gallery.default +targetEntityType: node +bundle: photo_gallery +mode: default +content: + body: + weight: 1 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_photo_gallery_img: + weight: 0 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: + ds: + ds_limit: '' + ft: + id: expert + settings: + lb: '' + prefix: '' + lbw-el: '' + lbw-cl: '' + lbw-at: '' + ow: true + ow-el: div + ow-cl: mb-10 + ow-at: '' + fis: true + fis-el: div + fis-cl: 'row col-sm-4' + fis-at: '' + fi-el: '' + fi-cl: '' + fi-at: '' + suffix: '' + lbw: false + lb-col: false + ow-def-at: false + ow-def-cl: false + fis-def-at: false + fi: false + fi-def-at: false + type: image + region: content +hidden: + langcode: true + links: true diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml new file mode 100644 index 0000000..54960ee --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.photo_gallery.field_photo_gallery_img + - node.type.photo_gallery + module: + - user + enforced: + module: + - photo_gallery +id: node.photo_gallery.teaser +targetEntityType: node +bundle: photo_gallery +mode: teaser +content: { } +hidden: + field_photo_gallery_img: true + langcode: true + links: true diff --git a/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml new file mode 100644 index 0000000..b9fcc71 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.photo_gallery + module: + - text + enforced: + module: + - photo_gallery +id: node.photo_gallery.body +field_name: body +entity_type: node +bundle: photo_gallery +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml new file mode 100644 index 0000000..a3bc37f --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_photo_gallery_img + - node.type.photo_gallery + module: + - image + enforced: + module: + - photo_gallery +id: node.photo_gallery.field_photo_gallery_img +field_name: field_photo_gallery_img +entity_type: node +bundle: photo_gallery +label: photo_gallery_img +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: photogallery + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml b/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml new file mode 100644 index 0000000..5c16698 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node + enforced: + module: + - photo_gallery +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_photo_gallery_img +field_name: field_photo_gallery_img +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml b/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml new file mode 100644 index 0000000..636478a --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml @@ -0,0 +1,51 @@ +uuid: 5eb7bd1c-4d96-4ff1-b6a0-c30d3bb141f0 +language: en +migration_group: default +id: photo_gallery_import +label: 'photo_gallery_import' +source: + plugin: csv + path: /var/www/photogallery/csv/pg.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/photogallery/images + file_dest: 'public://photo/' +process: + type: + plugin: default_value + default_value: photo_gallery + source_path: + - + plugin: skip_on_empty + method: process + source: image + - + plugin: concat + delimiter: / + source: + - constants/file_source + - image + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_photo_gallery_img: + - + plugin: explode + delimiter: ',' + source: image + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: photo_gallery +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml b/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml new file mode 100644 index 0000000..f666180 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - photo_gallery +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Photo Gallery' +type: photo_gallery +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/photo_gallery/config/install/views.view.photo_gallery.yml b/modules/bhavika/photo_gallery/config/install/views.view.photo_gallery.yml new file mode 100644 index 0000000..a7651ff --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/views.view.photo_gallery.yml @@ -0,0 +1,225 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.storage.node.field_photo_gallery_img + - node.type.photo_gallery + module: + - image + - node + - user + enforced: + module: + - photo_gallery +id: photo_gallery +label: 'Photo Gallery' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: + - + field: field_photo_gallery_img + rendered: true + rendered_strip: false + row_class: '' + default_row_class: true + uses_fields: true + row: + type: 'entity:node' + options: + relationship: none + view_mode: teaser + fields: + field_photo_gallery_img: + id: field_photo_gallery_img + table: node__field_photo_gallery_img + field: field_photo_gallery_img + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: image + settings: + image_style: '' + image_link: content + group_column: '' + group_columns: { } + group_rows: true + delta_limit: 1 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + plugin_id: field + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + group: 1 + type: + id: type + table: node_field_data + field: type + value: + photo_gallery: photo_gallery + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: 'Photo Gallery' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.node.field_photo_gallery_img' + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: photo-gallery + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.node.field_photo_gallery_img' diff --git a/modules/bhavika/photo_gallery/photo_gallery.info.yml b/modules/bhavika/photo_gallery/photo_gallery.info.yml new file mode 100644 index 0000000..2cbcca6 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.info.yml @@ -0,0 +1,18 @@ +name: photo_gallery +type: module +description: 'This module is for various pictures uploaded on site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:image + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/photo_gallery/photo_gallery.install b/modules/bhavika/photo_gallery/photo_gallery.install new file mode 100644 index 0000000..4c95c95 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function photo_gallery_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'photo_gallert'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/photo_gallery/photo_gallery.module b/modules/bhavika/photo_gallery/photo_gallery.module new file mode 100644 index 0000000..17bce25 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains photo_gallery.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function photo_gallery_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the photo_gallery module. + case 'help.page.photo_gallery': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for various pictures uploaded on site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function photo_gallery_theme() { + return [ + 'photo_gallery' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/photo_gallery/photo_gallery.routing.yml b/modules/bhavika/photo_gallery/photo_gallery.routing.yml new file mode 100644 index 0000000..cb0a3fb --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.routing.yml @@ -0,0 +1,8 @@ + +photo_gallery.photo_gallery_controller_photo_gallery: + path: '/photo_gallery' + defaults: + _controller: '\Drupal\photo_gallery\Controller\PhotoGalleryController::photo_gallery' + _title: 'Photo Gallery Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php b/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php new file mode 100644 index 0000000..02aca82 --- /dev/null +++ b/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\photo_gallery\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class PhotoGalleryController. + */ +class PhotoGalleryController extends ControllerBase { + + /** + * Photo_gallery. + * + * @return string + * Return Hello string. + */ + public function photo_gallery() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: photo_gallery') + ]; + } + +} diff --git a/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig b/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php b/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php new file mode 100644 index 0000000..5dd8f26 --- /dev/null +++ b/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\photo_gallery\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the photo_gallery module. + */ +class PhotoGalleryControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "photo_gallery PhotoGalleryController's controller functionality", + 'description' => 'Test Unit for module photo_gallery and controller PhotoGalleryController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests photo_gallery functionality. + */ + public function testPhotoGalleryController() { + // Check that the basic functions of module photo_gallery. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php b/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..dfe0211 --- /dev/null +++ b/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\photo_gallery\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group photo_gallery + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['photo_gallery']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} |