diff options
435 files changed, 19027 insertions, 3 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..44aeeef --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.info.yml @@ -0,0 +1,17 @@ +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 + - department:department + 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..69d24cc --- /dev/null +++ b/modules/bhavika/clubs/clubs.info.yml @@ -0,0 +1,41 @@ +name: 'clubs' +type: module +description: 'this module is for clubs content type.' +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/compimage.style.compimg.yml b/modules/bhavika/company/config/install/compimage.style.compimg.yml new file mode 100644 index 0000000..46243fd --- /dev/null +++ b/modules/bhavika/company/config/install/compimage.style.compimg.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - company +name: compimg +label: 'CompanyImage (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/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..ea038ad --- /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.compimg + - 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: compimg + 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/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.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/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..e00e6f5 --- /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.deptimg + - 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: deptimg + 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/deptimage.style.deptimg.yml b/modules/bhavika/department/config/install/deptimage.style.deptimg.yml new file mode 100644 index 0000000..bcf3210 --- /dev/null +++ b/modules/bhavika/department/config/install/deptimage.style.deptimg.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - department +name: deptimg +label: 'DeptImg (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/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/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..54faa20 --- /dev/null +++ b/modules/bhavika/department/department.info.yml @@ -0,0 +1,19 @@ +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); + } + +} diff --git a/modules/fahad/README.md b/modules/fahad/README.md index 8c65330..a223493 100644 --- a/modules/fahad/README.md +++ b/modules/fahad/README.md @@ -1 +1,37 @@ -Include your created custom modules for content type here
\ No newline at end of file + +# Custom Modules Developed for Drupal 8 + +# --Pre Requisites: + +--<b>Dupal Console Or Drush</b> + +# --To Install the Module(s): + +--Place the required Content Type Module(s) in The Custom Folder of Modules of your Drupal Directory<b>(./modules/custom)</b> + +# --Intsalling with Drupal Console : + +-->In the Terminal navigate to root directory of your Project. + +-->Run the Command:<b>$ drupal modules:install module_name.</b> + +-->Example if module is 'artcle' then run: $ drupal module:install article. + +# --Installing with Drush : + +-->In the Terminal navigate to root directory of your Project. + +-->Run the Command:<b>$ drush en module_name</b> + +-->Example if module is 'artcle' then run: $ drush en article + + +# --I'd love it if you could Contribute to my Modules: + +--><b>Fork</b> my Repository + +-->Work with your fork and commit your changes to your Repo. + +-->Create a Pull Request. + +-->We’ll analyse your changes and Merge it. diff --git a/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml b/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml new file mode 100644 index 0000000..a3076e7 --- /dev/null +++ b/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml @@ -0,0 +1,13 @@ +name: 'academic_calendar_content' +type: module +description: 'Academic Calendar Content Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:path + - drupal:text + - drupal:user + - drupal:node + - drupal:menu_ui + - drupal:taxonomy
\ No newline at end of file diff --git a/modules/fahad/academic_calendar_content/academic_calendar_content.module b/modules/fahad/academic_calendar_content/academic_calendar_content.module new file mode 100644 index 0000000..9b4e25a --- /dev/null +++ b/modules/fahad/academic_calendar_content/academic_calendar_content.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains academic_calendar_content.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function academic_calendar_content_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the academic_calendar_content module. + case 'help.page.academic_calendar_content': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Academic Calendar Content Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function academic_calendar_content_theme() { + return [ + 'academic_calendar_content' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/academic_calendar_content/composer.json b/modules/fahad/academic_calendar_content/composer.json new file mode 100644 index 0000000..56c9201 --- /dev/null +++ b/modules/fahad/academic_calendar_content/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/academic_calendar_content", + "type": "drupal-module", + "description": "Academic Calendar Content Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/academic_calendar_content", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/academic_calendar_content", + "source": "http://cgit.drupalcode.org/academic_calendar_content" + }, + "require": { } +} diff --git a/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml new file mode 100644 index 0000000..480e11a --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml @@ -0,0 +1,103 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.academic_calendar_content.body + - field.field.node.academic_calendar_content.field_calender_file + - field.field.node.academic_calendar_content.field_calender_type + - node.type.academic_calendar_content + module: + - file + - path + - text + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.default +targetEntityType: node +bundle: academic_calendar_content +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_calender_file: + weight: 122 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_calender_type: + weight: 123 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + 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/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml new file mode 100644 index 0000000..24048f0 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml @@ -0,0 +1,50 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.academic_calendar_content.body + - field.field.node.academic_calendar_content.field_calender_file + - field.field.node.academic_calendar_content.field_calender_type + - node.type.academic_calendar_content + module: + - file + - text + - user + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.default +targetEntityType: node +bundle: academic_calendar_content +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_calender_file: + weight: 102 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_calender_type: + weight: 103 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml new file mode 100644 index 0000000..cb44542 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.academic_calendar_content.body + - node.type.academic_calendar_content + module: + - text + - user + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.teaser +targetEntityType: node +bundle: academic_calendar_content +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/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml new file mode 100644 index 0000000..4e036ce --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.academic_calendar_content + module: + - text + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.body +field_name: body +entity_type: node +bundle: academic_calendar_content +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/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml new file mode 100644 index 0000000..93aa78f --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_calender_file + - node.type.academic_calendar_content + module: + - file + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.field_calender_file +field_name: field_calender_file +entity_type: node +bundle: academic_calendar_content +label: 'calender file' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf docx doc pptx ppt' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml new file mode 100644 index 0000000..59ff251 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_calender_type + - node.type.academic_calendar_content + - taxonomy.vocabulary.academic_calender + enforced: + module: + - academic_calendar_content +id: node.academic_calendar_content.field_calender_type +field_name: field_calender_type +entity_type: node +bundle: academic_calendar_content +label: 'Calender type' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + academic_calender: academic_calender + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml new file mode 100644 index 0000000..65a2c30 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml @@ -0,0 +1,26 @@ +uuid: fabaae87-0065-4967-8243-6515646f47ee +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - academic_calendar_content +id: node.field_calender_file +field_name: field_calender_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/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml new file mode 100644 index 0000000..cbe0fcf --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml @@ -0,0 +1,23 @@ +uuid: cd0df0ee-d712-40eb-bbbb-12a100fafb16 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - academic_calendar_content +id: node.field_calender_type +field_name: field_calender_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/fahad/academic_calendar_content/config/install/migrate_plus.migration.academic_calendar.yml b/modules/fahad/academic_calendar_content/config/install/migrate_plus.migration.academic_calendar.yml new file mode 100644 index 0000000..861da64 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/migrate_plus.migration.academic_calendar.yml @@ -0,0 +1,51 @@ +langcode: en +status: true +dependencies: { } +id: academic_calendar +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV for Academic Calendar' +source: + plugin: csv + path: /var/www/html/project/docroot/calendar.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: academic_calendar_content + source_path_two: + - + plugin: skip_on_empty + method: process + source: file + - + plugin: concat + delimiter: / + source: + - constants/file_source + - file + title: title + body: body + field_calender_file: + plugin: file_import + source: '@source_path_two' + destination: constants/file_dest + field_calender_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: academic_calender + source: type +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml b/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml new file mode 100644 index 0000000..fdb758a --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - academic_calendar_content +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Academic Calendar' +type: academic_calendar_content +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml b/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml new file mode 100644 index 0000000..cb954c2 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml @@ -0,0 +1,12 @@ +uuid: 216d49b2-aa1e-44b0-b4a0-7c3d78450276 +langcode: en +status: true +dependencies: + enforced: + module: + - academic_calendar_content +name: 'Academic Calender' +vid: academic_calender +description: 'Calendar and Time Table' +hierarchy: 0 +weight: 0 diff --git a/modules/fahad/academic_calendar_content/config/install/views.view.academic_calendar.yml b/modules/fahad/academic_calendar_content/config/install/views.view.academic_calendar.yml new file mode 100644 index 0000000..e5dd8d0 --- /dev/null +++ b/modules/fahad/academic_calendar_content/config/install/views.view.academic_calendar.yml @@ -0,0 +1,202 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.academic_calendar_content + - system.menu.main + module: + - node + - user +id: academic_calendar +label: 'Academic Calendar' +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: + relationship: none + view_mode: full + 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: + academic_calendar_content: academic_calendar_content + 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: 'Academic Calendar' + 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: academic-calendar + menu: + type: normal + title: Calendar + description: '' + expanded: true + parent: 'menu_link_content:f22943a5-ddf8-4836-9e21-c522d862b8f5' + weight: 0 + context: '0' + menu_name: main + 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/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig b/modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php b/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..b62009a --- /dev/null +++ b/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\academic_calendar_content\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group academic_calendar_content + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['academic_calendar_content']; + + /** + * 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/fahad/article/article.info.yml b/modules/fahad/article/article.info.yml new file mode 100644 index 0000000..49c0771 --- /dev/null +++ b/modules/fahad/article/article.info.yml @@ -0,0 +1,16 @@ +name: 'article' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:comment + - drupal:image + - drupal:link + - drupal:path + - drupal:text + - drupal:user + - drupal:node + - drupal:taxonomy + +
\ No newline at end of file diff --git a/modules/fahad/article/article.module b/modules/fahad/article/article.module new file mode 100644 index 0000000..f367abe --- /dev/null +++ b/modules/fahad/article/article.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains article.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function article_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the article module. + case 'help.page.article': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function article_theme() { + return [ + 'article' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/article/composer.json b/modules/fahad/article/composer.json new file mode 100644 index 0000000..7088212 --- /dev/null +++ b/modules/fahad/article/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/article", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/article", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/article", + "source": "http://cgit.drupalcode.org/article" + }, + "require": { } +} diff --git a/modules/fahad/article/config/install/field.storage.node.field_article_link.yml b/modules/fahad/article/config/install/field.storage.node.field_article_link.yml new file mode 100644 index 0000000..b8f5a5b --- /dev/null +++ b/modules/fahad/article/config/install/field.storage.node.field_article_link.yml @@ -0,0 +1,22 @@ +uuid: 1d56f0f0-900c-47bb-8b59-47f0c7c531c7 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - article +id: node.field_article_link +field_name: field_article_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/fahad/article/templates/article.html.twig b/modules/fahad/article/templates/article.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/article/templates/article.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/article/tests/src/Functional/LoadTest.php b/modules/fahad/article/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..5607b01 --- /dev/null +++ b/modules/fahad/article/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\article\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group article + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['article']; + + /** + * 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/fahad/bog_meetings/bog_meetings.info.yml b/modules/fahad/bog_meetings/bog_meetings.info.yml new file mode 100644 index 0000000..2fe952e --- /dev/null +++ b/modules/fahad/bog_meetings/bog_meetings.info.yml @@ -0,0 +1,13 @@ +name: 'bog_meetings' +type: module +description: 'Bog Meetings' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:path + - drupal:text + - drupal:user + - drupal:node + - drupal:menu_ui + diff --git a/modules/fahad/bog_meetings/bog_meetings.module b/modules/fahad/bog_meetings/bog_meetings.module new file mode 100644 index 0000000..cf1a248 --- /dev/null +++ b/modules/fahad/bog_meetings/bog_meetings.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains bog_meetings.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function bog_meetings_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the bog_meetings module. + case 'help.page.bog_meetings': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Bog Meetings') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function bog_meetings_theme() { + return [ + 'bog_meetings' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/bog_meetings/composer.json b/modules/fahad/bog_meetings/composer.json new file mode 100644 index 0000000..81c2525 --- /dev/null +++ b/modules/fahad/bog_meetings/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/bog_meetings", + "type": "drupal-module", + "description": "Bog Meetings", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/bog_meetings", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/bog_meetings", + "source": "http://cgit.drupalcode.org/bog_meetings" + }, + "require": { } +} diff --git a/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml b/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml new file mode 100644 index 0000000..ac57c6e --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml @@ -0,0 +1,100 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.bog_meetings.body + - field.field.node.bog_meetings.field_bog_date_time + - field.field.node.bog_meetings.field_bog_file + - node.type.bog_meetings + module: + - file + - path + - text + enforced: + module: + - bog_meetings +id: node.bog_meetings.default +targetEntityType: node +bundle: bog_meetings +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_bog_date_time: + weight: 123 + settings: { } + third_party_settings: { } + type: datetime_timestamp + region: content + field_bog_file: + weight: 122 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + 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/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml new file mode 100644 index 0000000..f5db250 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml @@ -0,0 +1,52 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.bog_meetings.body + - field.field.node.bog_meetings.field_bog_date_time + - field.field.node.bog_meetings.field_bog_file + - node.type.bog_meetings + module: + - file + - text + - user + enforced: + module: + - bog_meetings +id: node.bog_meetings.default +targetEntityType: node +bundle: bog_meetings +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_bog_date_time: + weight: 103 + label: above + settings: + date_format: medium + custom_date_format: '' + timezone: '' + third_party_settings: { } + type: timestamp + region: content + field_bog_file: + weight: 102 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml new file mode 100644 index 0000000..30d55a6 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.bog_meetings.body + - node.type.bog_meetings + module: + - text + - user + enforced: + module: + - bog_meetings +id: node.bog_meetings.teaser +targetEntityType: node +bundle: bog_meetings +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/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml new file mode 100644 index 0000000..3a12aa2 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.bog_meetings + module: + - text + enforced: + module: + - bog_meetings +id: node.bog_meetings.body +field_name: body +entity_type: node +bundle: bog_meetings +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/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml new file mode 100644 index 0000000..0cccb61 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_bog_date_time + - node.type.bog_meetings + enforced: + module: + - bog_meetings +id: node.bog_meetings.field_bog_date_time +field_name: field_bog_date_time +entity_type: node +bundle: bog_meetings +label: 'bog date/Time' +description: '' +required: false +translatable: false +default_value: + - + value: 1559973785 +default_value_callback: '' +settings: { } +field_type: timestamp diff --git a/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml new file mode 100644 index 0000000..5449d93 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_bog_file + - node.type.bog_meetings + module: + - file + enforced: + module: + - bog_meetings +id: node.bog_meetings.field_bog_file +field_name: field_bog_file +entity_type: node +bundle: bog_meetings +label: 'bog file' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf docx doc pptx ppt' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml new file mode 100644 index 0000000..debbf5a --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml @@ -0,0 +1,21 @@ +uuid: 3f598fd3-a111-4c7a-9862-036c50eabd6f +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - bog_meetings +id: node.field_bog_date_time +field_name: field_bog_date_time +entity_type: node +type: timestamp +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml new file mode 100644 index 0000000..9814479 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml @@ -0,0 +1,26 @@ +uuid: 5940e961-5e06-438b-9378-00f95e3c7fd8 +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - bog_meetings +id: node.field_bog_file +field_name: field_bog_file +entity_type: node +type: file +settings: + display_field: true + 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/fahad/bog_meetings/config/install/migrate_plus.migration.bog_meetings.yml b/modules/fahad/bog_meetings/config/install/migrate_plus.migration.bog_meetings.yml new file mode 100644 index 0000000..34490ce --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/migrate_plus.migration.bog_meetings.yml @@ -0,0 +1,53 @@ +langcode: en +status: true +dependencies: { } +id: bog_meetings +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Bog Meetings' +source: + plugin: csv + path: /var/www/html/project/docroot/bog_meetings.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: bog_meetings + source_path: + - + plugin: skip_on_empty + method: process + source: bog_file + - + plugin: concat + delimiter: / + source: + - constants/file_source + - bog_file + title: title + body: body + field_bog_date_time: + - + plugin: format_date + from_format: 'd/m/Y H:i:s' + to_format: 'Y-m-d\TH:i:s' + from_timezone: Asia/Kolkata + to_timezone: UTC + source: bog_date_time + field_bog_file: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml b/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml new file mode 100644 index 0000000..4b508cf --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - bog_meetings +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'BoG Meetings' +type: bog_meetings +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/bog_meetings/config/install/views.view.bog_meetings.yml b/modules/fahad/bog_meetings/config/install/views.view.bog_meetings.yml new file mode 100644 index 0000000..46fc123 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/views.view.bog_meetings.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.bog_meetings + - system.menu.main + module: + - node + - user +id: bog_meetings +label: 'Bog Meetings' +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: + bog_meetings: bog_meetings + 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: 'Bog Meetings' + 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: bog-meetings + menu: + type: normal + title: 'Bog Meet' + description: '' + expanded: false + parent: 'menu_link_content:feea89d0-7c4d-492d-bc5e-42ae502ecc4b' + weight: 0 + context: '0' + menu_name: main + 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/fahad/bog_meetings/templates/bog-meetings.html.twig b/modules/fahad/bog_meetings/templates/bog-meetings.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/bog_meetings/templates/bog-meetings.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php b/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..7f21cec --- /dev/null +++ b/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\bog_meetings\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group bog_meetings + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['bog_meetings']; + + /** + * 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/fahad/clubs/clubs.info.yml b/modules/fahad/clubs/clubs.info.yml new file mode 100644 index 0000000..0b76af6 --- /dev/null +++ b/modules/fahad/clubs/clubs.info.yml @@ -0,0 +1,12 @@ +name: 'clubs' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:path + - drupal:text + - drupal:user + - drupal:node + - drupal:taxonomy + - drupal:menu_ui
\ No newline at end of file diff --git a/modules/fahad/clubs/clubs.module b/modules/fahad/clubs/clubs.module new file mode 100644 index 0000000..b317fcb --- /dev/null +++ b/modules/fahad/clubs/clubs.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains clubs.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function clubs_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the clubs module. + case 'help.page.clubs': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function clubs_theme() { + return [ + 'clubs' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/clubs/composer.json b/modules/fahad/clubs/composer.json new file mode 100644 index 0000000..957e115 --- /dev/null +++ b/modules/fahad/clubs/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/clubs", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/clubs", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/clubs", + "source": "http://cgit.drupalcode.org/clubs" + }, + "require": { } +} diff --git a/modules/fahad/clubs/config/install/core.entity_form_display.node.clubs.default.yml b/modules/fahad/clubs/config/install/core.entity_form_display.node.clubs.default.yml new file mode 100644 index 0000000..981cd35 --- /dev/null +++ b/modules/fahad/clubs/config/install/core.entity_form_display.node.clubs.default.yml @@ -0,0 +1,133 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_class + - field.field.node.clubs.field_club_category + - field.field.node.clubs.field_club_department + - field.field.node.clubs.field_faculty_incharge + - field.field.node.clubs.field_student_volunteer + - node.type.clubs + module: + - path + - text + + enforced: + module: + - clubs +id: node.clubs.default +targetEntityType: node +bundle: clubs +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_class: + weight: 124 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: text_textfield + region: content + field_club_category: + weight: 125 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_club_department: + weight: 126 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_faculty_incharge: + weight: 123 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_student_volunteer: + weight: 122 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: text_textfield + 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/fahad/clubs/config/install/core.entity_view_display.node.clubs.default.yml b/modules/fahad/clubs/config/install/core.entity_view_display.node.clubs.default.yml new file mode 100644 index 0000000..2746c1f --- /dev/null +++ b/modules/fahad/clubs/config/install/core.entity_view_display.node.clubs.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_class + - field.field.node.clubs.field_club_category + - field.field.node.clubs.field_club_department + - field.field.node.clubs.field_faculty_incharge + - field.field.node.clubs.field_student_volunteer + - node.type.clubs + module: + - text + - user + enforced: + module: + - clubs +id: node.clubs.default +targetEntityType: node +bundle: clubs +mode: default +content: + body: + label: hidden + type: text_default + weight: 1 + settings: { } + third_party_settings: { } + region: content + field_class: + weight: 4 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_club_department: + weight: 5 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_faculty_incharge: + weight: 2 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_student_volunteer: + weight: 3 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_club_category: true + langcode: true diff --git a/modules/fahad/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml b/modules/fahad/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml new file mode 100644 index 0000000..32ad599 --- /dev/null +++ b/modules/fahad/clubs/config/install/core.entity_view_display.node.clubs.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.clubs.body + - node.type.clubs + module: + - 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: 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/fahad/clubs/config/install/field.field.node.clubs.body.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.body.yml new file mode 100644 index 0000000..2cb335e --- /dev/null +++ b/modules/fahad/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/fahad/clubs/config/install/field.field.node.clubs.field_class.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.field_class.yml new file mode 100644 index 0000000..d44cd98 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.field.node.clubs.field_class.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_class + - node.type.clubs + module: + - text + enforced: + module: + - clubs +id: node.clubs.field_class +field_name: field_class +entity_type: node +bundle: clubs +label: class +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text diff --git a/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_category.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_category.yml new file mode 100644 index 0000000..0a2ebea --- /dev/null +++ b/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_category.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_club_category + - node.type.clubs + - taxonomy.vocabulary.club_category + enforced: + module: + - clubs +id: node.clubs.field_club_category +field_name: field_club_category +entity_type: node +bundle: clubs +label: club_category +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + club_category: club_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_department.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_department.yml new file mode 100644 index 0000000..15e2472 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.field.node.clubs.field_club_department.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_club_department + - node.type.clubs + - node.type.department + enforced: + module: + - clubs +id: node.clubs.field_club_department +field_name: field_club_department +entity_type: node +bundle: clubs +label: 'Club 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/fahad/clubs/config/install/field.field.node.clubs.field_faculty_incharge.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.field_faculty_incharge.yml new file mode 100644 index 0000000..7eb94be --- /dev/null +++ b/modules/fahad/clubs/config/install/field.field.node.clubs.field_faculty_incharge.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_incharge + - node.type.clubs + - node.type.fac_page + enforced: + module: + - clubs +id: node.clubs.field_faculty_incharge +field_name: field_faculty_incharge +entity_type: node +bundle: clubs +label: faculty_incharge +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + fac_page: fac_page + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/clubs/config/install/field.field.node.clubs.field_student_volunteer.yml b/modules/fahad/clubs/config/install/field.field.node.clubs.field_student_volunteer.yml new file mode 100644 index 0000000..8d42844 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.field.node.clubs.field_student_volunteer.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_student_volunteer + - node.type.clubs + module: + - text + enforced: + module: + - clubs +id: node.clubs.field_student_volunteer +field_name: field_student_volunteer +entity_type: node +bundle: clubs +label: student_volunteer +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text diff --git a/modules/fahad/clubs/config/install/field.storage.node.field_class.yml b/modules/fahad/clubs/config/install/field.storage.node.field_class.yml new file mode 100644 index 0000000..97a82f2 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.storage.node.field_class.yml @@ -0,0 +1,23 @@ +uuid: 8293a5a2-e4b9-4b58-8e49-1dc73ef8a8b8 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - clubs +id: node.field_class +field_name: field_class +entity_type: node +type: text +settings: + max_length: 255 +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/clubs/config/install/field.storage.node.field_club_category.yml b/modules/fahad/clubs/config/install/field.storage.node.field_club_category.yml new file mode 100644 index 0000000..cece130 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.storage.node.field_club_category.yml @@ -0,0 +1,23 @@ +uuid: b4c4d850-9c5a-4c72-9fd7-fce06eb39271 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - clubs +id: node.field_club_category +field_name: field_club_category +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/fahad/clubs/config/install/field.storage.node.field_club_department.yml b/modules/fahad/clubs/config/install/field.storage.node.field_club_department.yml new file mode 100644 index 0000000..c66f5c3 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.storage.node.field_club_department.yml @@ -0,0 +1,22 @@ +uuid: c63446e6-d556-4733-950b-296b97f50d1b +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - clubs +id: node.field_club_department +field_name: field_club_department +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/fahad/clubs/config/install/field.storage.node.field_faculty_incharge.yml b/modules/fahad/clubs/config/install/field.storage.node.field_faculty_incharge.yml new file mode 100644 index 0000000..d7f2272 --- /dev/null +++ b/modules/fahad/clubs/config/install/field.storage.node.field_faculty_incharge.yml @@ -0,0 +1,22 @@ +uuid: 35ea0028-c7c7-4200-9e19-318108f6925f +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - clubs +id: node.field_faculty_incharge +field_name: field_faculty_incharge +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/fahad/clubs/config/install/field.storage.node.field_student_volunteer.yml b/modules/fahad/clubs/config/install/field.storage.node.field_student_volunteer.yml new file mode 100644 index 0000000..7694eca --- /dev/null +++ b/modules/fahad/clubs/config/install/field.storage.node.field_student_volunteer.yml @@ -0,0 +1,23 @@ +uuid: df0a956d-fbe0-4f92-8e51-b59d7ace8965 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - clubs +id: node.field_student_volunteer +field_name: field_student_volunteer +entity_type: node +type: text +settings: + max_length: 255 +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/clubs/config/install/migrate_plus.migration.clubs.yml b/modules/fahad/clubs/config/install/migrate_plus.migration.clubs.yml new file mode 100644 index 0000000..90bec4a --- /dev/null +++ b/modules/fahad/clubs/config/install/migrate_plus.migration.clubs.yml @@ -0,0 +1,47 @@ +langcode: en +status: true +dependencies: { } +id: clubs +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV for Clubs' +source: + plugin: csv + path: /var/www/html/project/docroot/test_migration_trail.csv + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: clubs + title: title + body: body + field_class: class + field_student_volunteer: student_volunteer + field_club_category: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: club_category + source: category + field_faculty_incharge: + - + plugin: entity_lookup + entity_type: node + bundle: fac_page + source: faculty_incharge + field_club_department: + - + plugin: entity_lookup + entity_type: node + bundle: department + source: department +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/clubs/config/install/node.type.clubs.yml b/modules/fahad/clubs/config/install/node.type.clubs.yml new file mode 100644 index 0000000..ced00f4 --- /dev/null +++ b/modules/fahad/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: 'College Clubs' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/clubs/config/install/taxonomy.vocabulary.club_category.yml b/modules/fahad/clubs/config/install/taxonomy.vocabulary.club_category.yml new file mode 100644 index 0000000..aa7456a --- /dev/null +++ b/modules/fahad/clubs/config/install/taxonomy.vocabulary.club_category.yml @@ -0,0 +1,12 @@ +uuid: b7da9ff8-ed69-4737-824e-883e436d8d70 +langcode: en +status: true +dependencies: + enforced: + module: + - clubs +name: 'Club Category' +vid: club_category +description: 'Category of the Club' +hierarchy: 0 +weight: 0 diff --git a/modules/fahad/clubs/config/install/views.view.clubs.yml b/modules/fahad/clubs/config/install/views.view.clubs.yml new file mode 100644 index 0000000..ecef89d --- /dev/null +++ b/modules/fahad/clubs/config/install/views.view.clubs.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.clubs + - system.menu.main + module: + - node + - user +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: 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: full + 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: + 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: { } + 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: clubs + menu: + type: normal + title: Clubs + description: 'IIITT Clubs' + expanded: false + parent: '' + weight: -47 + context: '0' + menu_name: main + 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/fahad/clubs/templates/clubs.html.twig b/modules/fahad/clubs/templates/clubs.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/clubs/templates/clubs.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/clubs/tests/src/Functional/LoadTest.php b/modules/fahad/clubs/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..e78518a --- /dev/null +++ b/modules/fahad/clubs/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\clubs\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group clubs + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['clubs']; + + /** + * 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/fahad/department/composer.json b/modules/fahad/department/composer.json new file mode 100644 index 0000000..07d950c --- /dev/null +++ b/modules/fahad/department/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/department", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "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" + }, + "require": { } +} diff --git a/modules/fahad/department/config/install/core.entity_form_display.node.department.default.yml b/modules/fahad/department/config/install/core.entity_form_display.node.department.default.yml new file mode 100644 index 0000000..4432971 --- /dev/null +++ b/modules/fahad/department/config/install/core.entity_form_display.node.department.default.yml @@ -0,0 +1,84 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - node.type.department + module: + - path + - text + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +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: { } + 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/fahad/department/config/install/core.entity_view_display.node.department.default.yml b/modules/fahad/department/config/install/core.entity_view_display.node.department.default.yml new file mode 100644 index 0000000..0f84292 --- /dev/null +++ b/modules/fahad/department/config/install/core.entity_view_display.node.department.default.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - node.type.department + module: + - text + - user + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/department/config/install/core.entity_view_display.node.department.teaser.yml b/modules/fahad/department/config/install/core.entity_view_display.node.department.teaser.yml new file mode 100644 index 0000000..28c59d7 --- /dev/null +++ b/modules/fahad/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/fahad/department/config/install/field.field.node.department.body.yml b/modules/fahad/department/config/install/field.field.node.department.body.yml new file mode 100644 index 0000000..fb7688f --- /dev/null +++ b/modules/fahad/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/fahad/department/config/install/migrate_plus.migration.Department.yml b/modules/fahad/department/config/install/migrate_plus.migration.Department.yml new file mode 100644 index 0000000..f5c0f4e --- /dev/null +++ b/modules/fahad/department/config/install/migrate_plus.migration.Department.yml @@ -0,0 +1,28 @@ + +langcode: en +status: true +dependencies: { } +id: Department +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: Deaprtment +source: + plugin: csv + path: /var/www/html/project/docroot/Department.csv + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: department + title: title + body: body +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/department/config/install/views.view.department.yml b/modules/fahad/department/config/install/views.view.department.yml new file mode 100644 index 0000000..5dc7192 --- /dev/null +++ b/modules/fahad/department/config/install/views.view.department.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.department + - system.menu.main + module: + - node + - user +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: 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: + 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 + menu: + type: normal + title: Departments + description: '' + expanded: false + parent: 'menu_link_content:f22943a5-ddf8-4836-9e21-c522d862b8f5' + weight: 0 + context: '0' + menu_name: main + 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/fahad/department/department.info.yml b/modules/fahad/department/department.info.yml new file mode 100644 index 0000000..d7e6e9d --- /dev/null +++ b/modules/fahad/department/department.info.yml @@ -0,0 +1,12 @@ +name: 'department' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui +
\ No newline at end of file diff --git a/modules/fahad/department/department.module b/modules/fahad/department/department.module new file mode 100644 index 0000000..6058d00 --- /dev/null +++ b/modules/fahad/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('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function department_theme() { + return [ + 'department' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/department/templates/department.html.twig b/modules/fahad/department/templates/department.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/department/templates/department.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/department/tests/src/Functional/LoadTest.php b/modules/fahad/department/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..423abc0 --- /dev/null +++ b/modules/fahad/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/fahad/fac_page/composer.json b/modules/fahad/fac_page/composer.json new file mode 100644 index 0000000..71278a9 --- /dev/null +++ b/modules/fahad/fac_page/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/fac_page", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/fac_page", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/fac_page", + "source": "http://cgit.drupalcode.org/fac_page" + }, + "require": { } +} diff --git a/modules/fahad/fac_page/config/install/core.entity_form_display.node.fac_page.default.yml b/modules/fahad/fac_page/config/install/core.entity_form_display.node.fac_page.default.yml new file mode 100644 index 0000000..c1917d7 --- /dev/null +++ b/modules/fahad/fac_page/config/install/core.entity_form_display.node.fac_page.default.yml @@ -0,0 +1,362 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.fac_page.body + - field.field.node.fac_page.field_affiliations + - field.field.node.fac_page.field_awards_and_fellowship + - field.field.node.fac_page.field_background + - field.field.node.fac_page.field_building_new + - field.field.node.fac_page.field_courses_taught + - field.field.node.fac_page.field_department + - field.field.node.fac_page.field_detailed_information_page + - field.field.node.fac_page.field_email_new + - field.field.node.fac_page.field_employment_category + - field.field.node.fac_page.field_faculty_cv + - field.field.node.fac_page.field_faculty_designation + - field.field.node.fac_page.field_faculty_photo + - field.field.node.fac_page.field_faculty_rd_proj + - field.field.node.fac_page.field_full_name + - field.field.node.fac_page.field_google_scholar_id + - field.field.node.fac_page.field_mobile_number_new + - field.field.node.fac_page.field_orcid + - field.field.node.fac_page.field_phone_no_new + - field.field.node.fac_page.field_research_area + - field.field.node.fac_page.field_room_no + - field.field.node.fac_page.field_scopus_id + - image.style.acad_fac_thumbnail_100_100_ + - node.type.fac_page + enforced: + module: + - fac_page + module: + - field_group + - file + - image + - link + - name + - paragraphs + - path + - shs + - text +third_party_settings: + field_group: + group_personal_information: + children: + - field_full_name + - field_faculty_designation + - field_employment_category + - field_faculty_photo + - field_faculty_cv + parent_name: '' + weight: 8 + format_type: tab + format_settings: + id: '' + classes: '' + formatter: closed + description: '' + required_fields: true + label: 'Personal Information' + region: content + group_external_id: + children: + - field_google_scholar_id + - field_scopus_id + - field_orcid + parent_name: '' + weight: 10 + format_type: tab + format_settings: + id: '' + classes: '' + formatter: closed + description: '' + required_fields: true + label: 'External Id' + region: content + group_contact_information: + children: + - field_building_new + - field_room_no + - field_email_new + - field_phone_no_new + - field_mobile_number_new + - field_detailed_information_page + parent_name: '' + weight: 11 + format_type: tab + format_settings: + id: '' + classes: '' + formatter: closed + description: '' + required_fields: true + label: 'Contact Information' + region: content + group_research_data: + children: + - field_research_area + - field_faculty_rd_proj + parent_name: '' + weight: 12 + format_type: tab + format_settings: + id: '' + classes: '' + formatter: closed + description: '' + required_fields: true + label: 'Research data' + region: content + group_teaching_and_professional_: + children: + - field_background + - field_affiliations + - field_awards_and_fellowship + - field_courses_taught + parent_name: '' + weight: 9 + format_type: tab + format_settings: + id: '' + classes: '' + formatter: closed + description: '' + required_fields: true + label: 'Teaching and professional backgrounds' + region: content +id: node.fac_page.default +targetEntityType: node +bundle: fac_page +mode: default +content: + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_affiliations: + weight: 25 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: string_textarea + region: content + field_awards_and_fellowship: + weight: 26 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_background: + weight: 24 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_building_new: + weight: 14 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_courses_taught: + weight: 27 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_department: + weight: 30 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_detailed_information_page: + weight: 20 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_email_new: + weight: 16 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: email_default + region: content + field_employment_category: + weight: 21 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_faculty_cv: + weight: 23 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_faculty_designation: + weight: 20 + settings: { } + third_party_settings: { } + type: options_select + region: content + field_faculty_photo: + weight: 22 + settings: + progress_indicator: throbber + preview_image_style: acad_fac_thumbnail_100_100_ + third_party_settings: { } + type: image_image + region: content + field_faculty_rd_proj: + type: entity_reference_paragraphs + weight: 29 + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + third_party_settings: { } + region: content + field_full_name: + weight: 19 + settings: { } + third_party_settings: { } + type: name_default + region: content + field_google_scholar_id: + weight: 20 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_mobile_number_new: + weight: 19 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_orcid: + weight: 22 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_phone_no_new: + weight: 18 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: text_textfield + region: content + field_research_area: + weight: 28 + settings: + force_deepest: true + create_new_items: false + create_new_levels: false + display_node_count: false + third_party_settings: { } + type: options_shs + region: content + field_room_no: + weight: 15 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_scopus_id: + weight: 21 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + 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: + body: true diff --git a/modules/fahad/fac_page/config/install/core.entity_view_display.node.fac_page.teaser.yml b/modules/fahad/fac_page/config/install/core.entity_view_display.node.fac_page.teaser.yml new file mode 100644 index 0000000..f868598 --- /dev/null +++ b/modules/fahad/fac_page/config/install/core.entity_view_display.node.fac_page.teaser.yml @@ -0,0 +1,71 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.fac_page.body + - field.field.node.fac_page.field_affiliations + - field.field.node.fac_page.field_awards_and_fellowship + - field.field.node.fac_page.field_background + - field.field.node.fac_page.field_building_new + - field.field.node.fac_page.field_courses_taught + - field.field.node.fac_page.field_detailed_information_page + - field.field.node.fac_page.field_email_new + - field.field.node.fac_page.field_employment_category + - field.field.node.fac_page.field_faculty_cv + - field.field.node.fac_page.field_faculty_designation + - field.field.node.fac_page.field_faculty_photo + - field.field.node.fac_page.field_faculty_rd_proj + - field.field.node.fac_page.field_full_name + - field.field.node.fac_page.field_google_scholar_id + - field.field.node.fac_page.field_mobile_number_new + - field.field.node.fac_page.field_orcid + - field.field.node.fac_page.field_phone_no_new + - field.field.node.fac_page.field_research_area + - field.field.node.fac_page.field_room_no + - field.field.node.fac_page.field_scopus_id + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text + - user +id: node.fac_page.teaser +targetEntityType: node +bundle: fac_page +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 + region: content +hidden: + field_affiliations: true + field_awards_and_fellowship: true + field_background: true + field_building_new: true + field_courses_taught: true + field_detailed_information_page: true + field_email_new: true + field_employment_category: true + field_faculty_cv: true + field_faculty_designation: true + field_faculty_photo: true + field_faculty_rd_proj: true + field_full_name: true + field_google_scholar_id: true + field_mobile_number_new: true + field_orcid: true + field_phone_no_new: true + field_research_area: true + field_room_no: true + field_scopus_id: true + langcode: true diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.body.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.body.yml new file mode 100644 index 0000000..8711c16 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text +id: node.fac_page.body +field_name: body +entity_type: node +bundle: fac_page +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/fahad/fac_page/config/install/field.field.node.fac_page.field_affiliations.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_affiliations.yml new file mode 100644 index 0000000..30af6ad --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_affiliations.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_affiliations + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_affiliations +field_name: field_affiliations +entity_type: node +bundle: fac_page +label: Affiliations +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_awards_and_fellowship.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_awards_and_fellowship.yml new file mode 100644 index 0000000..852d615 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_awards_and_fellowship.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_awards_and_fellowship + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text +id: node.fac_page.field_awards_and_fellowship +field_name: field_awards_and_fellowship +entity_type: node +bundle: fac_page +label: 'Awards and Fellowship' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_background.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_background.yml new file mode 100644 index 0000000..bc5b753 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_background.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_background + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text +id: node.fac_page.field_background +field_name: field_background +entity_type: node +bundle: fac_page +label: Background +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_building_new.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_building_new.yml new file mode 100644 index 0000000..f60a44c --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_building_new.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_building_new + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_building_new +field_name: field_building_new +entity_type: node +bundle: fac_page +label: Building +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_courses_taught.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_courses_taught.yml new file mode 100644 index 0000000..e3e980a --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_courses_taught.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_courses_taught + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text +id: node.fac_page.field_courses_taught +field_name: field_courses_taught +entity_type: node +bundle: fac_page +label: 'Courses Taught' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_department.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_department.yml new file mode 100644 index 0000000..32d6392 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_department.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_department + - node.type.department + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_department +field_name: field_department +entity_type: node +bundle: fac_page +label: Department +description: 'Academic Department Of Faculty' +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/fahad/fac_page/config/install/field.field.node.fac_page.field_detailed_information_page.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_detailed_information_page.yml new file mode 100644 index 0000000..9668b31 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_detailed_information_page.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_detailed_information_page + - node.type.fac_page + enforced: + module: + - fac_page + module: + - link +id: node.fac_page.field_detailed_information_page +field_name: field_detailed_information_page +entity_type: node +bundle: fac_page +label: 'Detailed Information Page' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_email_new.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_email_new.yml new file mode 100644 index 0000000..cb2198f --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_email_new.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_email_new + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_email_new +field_name: field_email_new +entity_type: node +bundle: fac_page +label: Email +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: email diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_employment_category.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_employment_category.yml new file mode 100644 index 0000000..200620f --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_employment_category.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_employment_category + - node.type.fac_page + - taxonomy.vocabulary.employment_category + enforced: + module: + - fac_page +id: node.fac_page.field_employment_category +field_name: field_employment_category +entity_type: node +bundle: fac_page +label: 'Employment Category' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + employment_category: employment_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_cv.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_cv.yml new file mode 100644 index 0000000..cd56bd6 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_cv.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_cv + - node.type.fac_page + enforced: + module: + - fac_page + module: + - file +id: node.fac_page.field_faculty_cv +field_name: field_faculty_cv +entity_type: node +bundle: fac_page +label: 'Faculty CV' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: 'faculty-cv/[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf doc docx' + max_filesize: '' + description_field: true + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_designation.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_designation.yml new file mode 100644 index 0000000..bca8b33 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_designation.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_designation + - node.type.fac_page + enforced: + module: + - fac_page + module: + - options +id: node.fac_page.field_faculty_designation +field_name: field_faculty_designation +entity_type: node +bundle: fac_page +label: 'Faculty Designation' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_photo.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_photo.yml new file mode 100644 index 0000000..727a55a --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_faculty_photo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_photo + - node.type.fac_page + enforced: + module: + - fac_page + module: + - image +id: node.fac_page.field_faculty_photo +field_name: field_faculty_photo +entity_type: node +bundle: fac_page +label: 'Faculty Photo' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: fac_images + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: 400x600 + min_resolution: '' + alt_field: true + alt_field_required: false + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: 325 + height: 325 + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_full_name.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_full_name.yml new file mode 100644 index 0000000..83320ff --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_full_name.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_full_name + - node.type.fac_page + enforced: + module: + - fac_page + module: + - name +id: node.fac_page.field_full_name +field_name: field_full_name +entity_type: node +bundle: fac_page +label: 'Full Name' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + size: + title: 6 + given: 20 + middle: 20 + family: 20 + generational: 5 + credentials: 35 + title_display: + title: description + given: description + middle: description + family: description + generational: description + credentials: description + field_type: + title: select + given: text + middle: text + family: text + generational: select + credentials: text + inline_css: + title: '' + given: '' + middle: '' + family: '' + generational: '' + credentials: '' + component_css: '' + component_layout: default + show_component_required_marker: false + credentials_inline: false + override_format: default +field_type: name diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_google_scholar_id.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_google_scholar_id.yml new file mode 100644 index 0000000..02b2260 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_google_scholar_id.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_google_scholar_id + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_google_scholar_id +field_name: field_google_scholar_id +entity_type: node +bundle: fac_page +label: 'Google Scholar ID' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_mobile_number_new.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_mobile_number_new.yml new file mode 100644 index 0000000..3180aed --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_mobile_number_new.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_mobile_number_new + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_mobile_number_new +field_name: field_mobile_number_new +entity_type: node +bundle: fac_page +label: 'Mobile Number' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_orcid.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_orcid.yml new file mode 100644 index 0000000..cdd4164 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_orcid.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_orcid + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_orcid +field_name: field_orcid +entity_type: node +bundle: fac_page +label: ORCID +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_phone_no_new.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_phone_no_new.yml new file mode 100644 index 0000000..24e2007 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_phone_no_new.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_phone_no_new + - node.type.fac_page + enforced: + module: + - fac_page + module: + - text +id: node.fac_page.field_phone_no_new +field_name: field_phone_no_new +entity_type: node +bundle: fac_page +label: 'Phone No' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_research_area.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_research_area.yml new file mode 100644 index 0000000..d826359 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_research_area.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_research_area + - node.type.fac_page + - taxonomy.vocabulary.research_area + enforced: + module: + - fac_page +id: node.fac_page.field_research_area +field_name: field_research_area +entity_type: node +bundle: fac_page +label: 'Research Area' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + research_area: research_area + sort: + field: name + direction: asc + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_room_no.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_room_no.yml new file mode 100644 index 0000000..6285f49 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_room_no.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_room_no + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_room_no +field_name: field_room_no +entity_type: node +bundle: fac_page +label: 'Room 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/fahad/fac_page/config/install/field.field.node.fac_page.field_scopus_id.yml b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_scopus_id.yml new file mode 100644 index 0000000..c15c759 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.field.node.fac_page.field_scopus_id.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_scopus_id + - node.type.fac_page + enforced: + module: + - fac_page +id: node.fac_page.field_scopus_id +field_name: field_scopus_id +entity_type: node +bundle: fac_page +label: 'Scopus ID' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_affiliations.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_affiliations.yml new file mode 100644 index 0000000..c6bfcee --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_affiliations.yml @@ -0,0 +1,24 @@ +uuid: 13386bb3-c21b-47b3-b6cd-7f592a10885a +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: WDDW4sW7AQ_vknjgOkSbUIbAxW0zZOnhwKaMLdPkzEE +id: node.field_affiliations +field_name: field_affiliations +entity_type: node +type: string_long +settings: + case_sensitive: false +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_awards_and_fellowship.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_awards_and_fellowship.yml new file mode 100644 index 0000000..582195a --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_awards_and_fellowship.yml @@ -0,0 +1,24 @@ +uuid: a34567d0-47a3-4118-bc4a-e9cbbbf8d4f7 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - text +_core: + default_config_hash: D6X6nBMj1l7Ge-_rRN4zWqbuSQck6aDu9LCoBe9SnbI +id: node.field_awards_and_fellowship +field_name: field_awards_and_fellowship +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_background.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_background.yml new file mode 100644 index 0000000..8a6b3da --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_background.yml @@ -0,0 +1,27 @@ +uuid: b28f6b50-7a03-4b2f-94e5-15a0ecb37fc4 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - text +_core: + default_config_hash: IUyxtCXqSW6iRX_Igy-_kWjrxhheV0CB7L96k9VtDCY + enforced: + module: + - fac_page +id: node.field_background +field_name: field_background +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_building_new.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_building_new.yml new file mode 100644 index 0000000..a6de0a4 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_building_new.yml @@ -0,0 +1,26 @@ +uuid: e8fd554d-85a1-406f-863e-e573d845e586 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: bz-W3lCnzscNglfrWpEqIFxTThTZXpIg6AzjhxqtSi0 +id: node.field_building_new +field_name: field_building_new +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/fahad/fac_page/config/install/field.storage.node.field_courses_taught.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_courses_taught.yml new file mode 100644 index 0000000..17f6883 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_courses_taught.yml @@ -0,0 +1,24 @@ +uuid: d920a923-d1a9-431e-a4c9-c35ddce87796 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - text +_core: + default_config_hash: OmJ_huKX8bZC5XV5NeklV6zNu73X6HzMIM6wL5FMuFg +id: node.field_courses_taught +field_name: field_courses_taught +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_department.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_department.yml new file mode 100644 index 0000000..5f0007a --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_department.yml @@ -0,0 +1,22 @@ +uuid: a15bf49c-ca1a-4016-8b01-be2949ec6bda +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - fac_page +id: node.field_department +field_name: field_department +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/fahad/fac_page/config/install/field.storage.node.field_detailed_information_page.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_detailed_information_page.yml new file mode 100644 index 0000000..1e502d5 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_detailed_information_page.yml @@ -0,0 +1,24 @@ +uuid: 56137caa-2fc1-482e-84b8-13c20a649476 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - link + - node +_core: + default_config_hash: BIGIJm07kR8QukQgH-vyNyykOgSGev6mi-eB0Zma2hc +id: node.field_detailed_information_page +field_name: field_detailed_information_page +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/fahad/fac_page/config/install/field.storage.node.field_email_new.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_email_new.yml new file mode 100644 index 0000000..58431a7 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_email_new.yml @@ -0,0 +1,23 @@ +uuid: 95d7fda5-b48f-4b72-bf62-14bba86a0829 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: TFPXeBTEXd2wKcUm5vWDIbDaygb7q-urjd-FpXTVeqw +id: node.field_email_new +field_name: field_email_new +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/fahad/fac_page/config/install/field.storage.node.field_employment_category.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_employment_category.yml new file mode 100644 index 0000000..203c963 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_employment_category.yml @@ -0,0 +1,25 @@ +uuid: 0a1c90bd-7d18-4c8f-b0a5-c3c9b85d0d72 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - taxonomy +_core: + default_config_hash: 4nCv0C0XEvZy6LNfY10emV5Z02DbCNuxXru5Tqv1lzo +id: node.field_employment_category +field_name: field_employment_category +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/fahad/fac_page/config/install/field.storage.node.field_faculty_cv.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_cv.yml new file mode 100644 index 0000000..aed5173 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_cv.yml @@ -0,0 +1,28 @@ +uuid: a745585a-d589-4d42-8f7a-af5b18a3f04f +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - file + - node +_core: + default_config_hash: K0zvb57nMxH2hiM7l3r6C39k-FlUMN1a7YwYhuXWFjs +id: node.field_faculty_cv +field_name: field_faculty_cv +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/fahad/fac_page/config/install/field.storage.node.field_faculty_designation.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_designation.yml new file mode 100644 index 0000000..6d68007 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_designation.yml @@ -0,0 +1,35 @@ +uuid: 08e957d8-54ab-47a8-95e3-23584cd40c26 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - options +_core: + default_config_hash: 17YDHkEImDDgcJCgWk-SrbVFJxYlX18Ri7mPpg8rUNE +id: node.field_faculty_designation +field_name: field_faculty_designation +entity_type: node +type: list_string +settings: + allowed_values: + - + value: Professor + label: Professor + - + value: 'Associate Prof.' + label: 'Associate Prof.' + - + value: 'Assistant Prof.' + label: 'Assistant Prof.' + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_photo.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_photo.yml new file mode 100644 index 0000000..cc26fb8 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_faculty_photo.yml @@ -0,0 +1,35 @@ +uuid: dd086e58-0ecc-41fe-a11d-51b33c764b13 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - file + - image + - node +_core: + default_config_hash: iPfW9_EnBa_lmDmKfDE83LxZOEwb6ggSSeZpn0kVOJk +id: node.field_faculty_photo +field_name: field_faculty_photo +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/fahad/fac_page/config/install/field.storage.node.field_full_name.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_full_name.yml new file mode 100644 index 0000000..5c3ca8b --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_full_name.yml @@ -0,0 +1,94 @@ +uuid: 75dcedd0-a791-4fe2-8947-577a24b73b12 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - name + - node +_core: + default_config_hash: cGX43Qhp8PlQHU6MJnzXb5kzeHvoIJwQWG7I31pfYQM +id: node.field_full_name +field_name: field_full_name +entity_type: node +type: name +settings: + components: + title: true + given: true + middle: true + family: true + generational: false + credentials: false + minimum_components: + given: true + family: true + title: false + middle: false + generational: false + credentials: false + labels: + title: Title + given: 'First name' + middle: 'Middle name' + family: 'Last name' + generational: Generational + credentials: Credentials + max_length: + title: 31 + given: 63 + middle: 127 + family: 63 + generational: 15 + credentials: 255 + autocomplete_source: + title: + title: title + given: { } + middle: { } + family: { } + generational: + generational: '0' + credentials: { } + autocomplete_separator: + title: ' ' + given: ' -' + middle: ' -' + family: ' -' + generational: ' ' + credentials: ', ' + allow_family_or_given: false + title_options: + - '-- --' + - Mr. + - Mrs. + - Miss + - Ms. + - Dr. + - Prof. + generational_options: + - '-- --' + - Jr. + - Sr. + - I + - II + - III + - IV + - V + - VI + - VII + - VIII + - IX + - X + sort_options: + title: false + generational: false +module: name +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_google_scholar_id.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_google_scholar_id.yml new file mode 100644 index 0000000..1e276f4 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_google_scholar_id.yml @@ -0,0 +1,26 @@ +uuid: 51e1157d-7e0b-45c5-bc18-cf8a125a2c8e +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: VNevItPdotSr8nh0hCyYYTMHVcFe94giH87n2o4yoYs +id: node.field_google_scholar_id +field_name: field_google_scholar_id +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/fahad/fac_page/config/install/field.storage.node.field_mobile_number_new.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_mobile_number_new.yml new file mode 100644 index 0000000..17061a0 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_mobile_number_new.yml @@ -0,0 +1,26 @@ +uuid: ba313479-74bf-4e1a-82d1-6781b2de0068 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: PUgaWJKvV4bonhlcgMngfpHazmXGNQhJJtzT6pxa8-E +id: node.field_mobile_number_new +field_name: field_mobile_number_new +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/fahad/fac_page/config/install/field.storage.node.field_orcid.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_orcid.yml new file mode 100644 index 0000000..00ace87 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_orcid.yml @@ -0,0 +1,26 @@ +uuid: 673736bf-6f60-46c1-af82-c930b824b2bf +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: ihgtKavET7YaK26AhyVbCmU5YG5Tk0CE8ia5n9pDAv4 +id: node.field_orcid +field_name: field_orcid +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/fahad/fac_page/config/install/field.storage.node.field_phone_no_new.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_phone_no_new.yml new file mode 100644 index 0000000..4ba9785 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_phone_no_new.yml @@ -0,0 +1,25 @@ +uuid: daf9a7e7-e4e4-452c-9c9d-dd5e604551da +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - text +_core: + default_config_hash: ZK7uwxG0_z1tTD5q0QUyNzDy2cXVyJtj0fugjSAyX6I +id: node.field_phone_no_new +field_name: field_phone_no_new +entity_type: node +type: text +settings: + max_length: 255 +module: text +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/fac_page/config/install/field.storage.node.field_research_area.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_research_area.yml new file mode 100644 index 0000000..2230f0e --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_research_area.yml @@ -0,0 +1,25 @@ +uuid: 19b6987f-3954-4255-a8e6-0d4e8ab61a04 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node + - taxonomy +_core: + default_config_hash: 1oCrwI1pKNr8auk3sl0t0MWtqz9ShRf5I9JuqJjsPmE +id: node.field_research_area +field_name: field_research_area +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/fahad/fac_page/config/install/field.storage.node.field_room_no.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_room_no.yml new file mode 100644 index 0000000..7463631 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_room_no.yml @@ -0,0 +1,25 @@ +uuid: 9b16bb6c-d6df-4815-9d76-cfda8dfc6c95 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: L62WpCYGJEQ3H4Ph0fU0Uh4Hykg9pTYs7Joc30mzHzc +id: node.field_room_no +field_name: field_room_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/fahad/fac_page/config/install/field.storage.node.field_scopus_id.yml b/modules/fahad/fac_page/config/install/field.storage.node.field_scopus_id.yml new file mode 100644 index 0000000..fdad156 --- /dev/null +++ b/modules/fahad/fac_page/config/install/field.storage.node.field_scopus_id.yml @@ -0,0 +1,26 @@ +uuid: 33999a6b-7796-4b59-9bd6-2cb4b51943ab +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - node +_core: + default_config_hash: Gnba7WoHoCyAXvpR2GqK1JGIVlz7gYTj1_aL6eKH_AY +id: node.field_scopus_id +field_name: field_scopus_id +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/fahad/fac_page/config/install/image.style.acad_fac_thumbnail_100_100_.yml b/modules/fahad/fac_page/config/install/image.style.acad_fac_thumbnail_100_100_.yml new file mode 100644 index 0000000..5900267 --- /dev/null +++ b/modules/fahad/fac_page/config/install/image.style.acad_fac_thumbnail_100_100_.yml @@ -0,0 +1,20 @@ +uuid: b0dfb3f3-14f0-4350-8c75-749dcb0e0179 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page +_core: + default_config_hash: obA8NilWYOPv-BY-Ds6yWCu96ELQKg-WwxCoEUw5Xgg +name: acad_fac_thumbnail_100_100_ +label: 'Acad Fac Thumbnail (100×100)' +effects: + 1ec55067-0450-47fd-bd92-779adb0a348b: + uuid: 1ec55067-0450-47fd-bd92-779adb0a348b + id: image_scale + weight: 1 + data: + width: 100 + height: 100 + upscale: false diff --git a/modules/fahad/fac_page/config/install/migrate_plus.migration.FACULTY MIGRATIONS.yml b/modules/fahad/fac_page/config/install/migrate_plus.migration.FACULTY MIGRATIONS.yml new file mode 100644 index 0000000..82de622 --- /dev/null +++ b/modules/fahad/fac_page/config/install/migrate_plus.migration.FACULTY MIGRATIONS.yml @@ -0,0 +1,52 @@ +langcode: en +status: true +dependencies: { } +id: 'FACULTY MIGRATIONS' +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV faculty' +source: + plugin: csv + path: /var/www/html/project/docroot/faculty.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: fac_page + source_path: + - + plugin: skip_on_empty + method: process + source: phuto + - + plugin: concat + delimiter: / + source: + - constants/file_source + - phuto + title: title + field_email_new: email + field_full_name: name + field_faculty_photo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_department: + - + plugin: entity_lookup + entity_type: node + bundle: department + source: entity_ref +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/fac_page/config/install/node.type.department.yml b/modules/fahad/fac_page/config/install/node.type.department.yml new file mode 100644 index 0000000..51a955e --- /dev/null +++ b/modules/fahad/fac_page/config/install/node.type.department.yml @@ -0,0 +1,23 @@ +uuid: ad1a39f1-b474-4889-af2b-0ab9875cef90 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' + + +name: Department +type: department +description: 'Academic Department' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/fac_page/config/install/node.type.fac_page.yml b/modules/fahad/fac_page/config/install/node.type.fac_page.yml new file mode 100644 index 0000000..f50c7dc --- /dev/null +++ b/modules/fahad/fac_page/config/install/node.type.fac_page.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Faculty Page' +type: fac_page +description: 'Content template for opening Faculty Page' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/fahad/fac_page/config/install/taxonomy.vocabulary.employment_category.yml b/modules/fahad/fac_page/config/install/taxonomy.vocabulary.employment_category.yml new file mode 100644 index 0000000..c91f82c --- /dev/null +++ b/modules/fahad/fac_page/config/install/taxonomy.vocabulary.employment_category.yml @@ -0,0 +1,14 @@ +uuid: 3101cede-85bf-4434-af74-04840c9536b5 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page +_core: + default_config_hash: r0SU6izUbpSAk_pWkCjaiXOFXC9WkeCMJXrTDpkCs84 +name: 'Employment Category' +vid: employment_category +description: 'Contains the Faculty Employment Category' +hierarchy: 0 +weight: 0 diff --git a/modules/fahad/fac_page/config/install/taxonomy.vocabulary.research_area.yml b/modules/fahad/fac_page/config/install/taxonomy.vocabulary.research_area.yml new file mode 100644 index 0000000..b2a1aa5 --- /dev/null +++ b/modules/fahad/fac_page/config/install/taxonomy.vocabulary.research_area.yml @@ -0,0 +1,14 @@ +uuid: d8a68894-5093-4bfa-b37a-39709a0cc7b3 +langcode: en +status: true +dependencies: + enforced: + module: + - fac_page +_core: + default_config_hash: hnTbw4FW7qH_Fc0M3RyzxdDzVdz75MFkD-lHgffTLzM +name: 'Research Area' +vid: research_area +description: 'Research Area terms' +hierarchy: 0 +weight: 0 diff --git a/modules/fahad/fac_page/config/install/views.view.people.yml b/modules/fahad/fac_page/config/install/views.view.people.yml new file mode 100644 index 0000000..7fadad1 --- /dev/null +++ b/modules/fahad/fac_page/config/install/views.view.people.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.fac_page + - system.menu.main + module: + - node + - user +id: people +label: People +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: full + 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: + fac_page: fac_page + 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: People + 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: people + menu: + type: normal + title: People + description: 'Faculty and Staff' + expanded: true + parent: '' + weight: -37 + context: '0' + menu_name: main + 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/fahad/fac_page/fac_page.info.yml b/modules/fahad/fac_page/fac_page.info.yml new file mode 100644 index 0000000..1d08e57 --- /dev/null +++ b/modules/fahad/fac_page/fac_page.info.yml @@ -0,0 +1,16 @@ +name: 'fac_page' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:image + - drupal:link + - drupal:name + - drupal:path + - drupal:text + - drupal:options + - drupal:user + - ds:ds + - pathauto:pathauto diff --git a/modules/fahad/fac_page/fac_page.module b/modules/fahad/fac_page/fac_page.module new file mode 100644 index 0000000..4187ac0 --- /dev/null +++ b/modules/fahad/fac_page/fac_page.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains fac_page.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function fac_page_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the fac_page module. + case 'help.page.fac_page': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function fac_page_theme() { + return [ + 'fac_page' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/fac_page/templates/fac-page.html.twig b/modules/fahad/fac_page/templates/fac-page.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/fac_page/templates/fac-page.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/fac_page/tests/src/Functional/LoadTest.php b/modules/fahad/fac_page/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..47f0ae3 --- /dev/null +++ b/modules/fahad/fac_page/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\fac_page\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group fac_page + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['fac_page']; + + /** + * 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/fahad/facility/composer.json b/modules/fahad/facility/composer.json new file mode 100644 index 0000000..8429c38 --- /dev/null +++ b/modules/fahad/facility/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/facility", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/facility", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/facility", + "source": "http://cgit.drupalcode.org/facility" + }, + "require": { } +} diff --git a/modules/fahad/facility/config/install/core.entity_form_display.node.facility.default.yml b/modules/fahad/facility/config/install/core.entity_form_display.node.facility.default.yml new file mode 100644 index 0000000..6be20e0 --- /dev/null +++ b/modules/fahad/facility/config/install/core.entity_form_display.node.facility.default.yml @@ -0,0 +1,105 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.facility.body + - field.field.node.facility.field_facility_ + - field.field.node.facility.field_facility_image + - image.style.thumbnail + - node.type.facility + module: + - image + - link + - path + - text + enforced: + module: + - facility +id: node.facility.default +targetEntityType: node +bundle: facility +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_facility_: + weight: 123 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_facility_image: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + 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/fahad/facility/config/install/core.entity_view_display.node.facility.default.yml b/modules/fahad/facility/config/install/core.entity_view_display.node.facility.default.yml new file mode 100644 index 0000000..71e3c6f --- /dev/null +++ b/modules/fahad/facility/config/install/core.entity_view_display.node.facility.default.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.facility.body + - field.field.node.facility.field_facility_ + - field.field.node.facility.field_facility_image + - node.type.facility + module: + - image + - link + - text + - user + enforced: + module: + - facility +id: node.facility.default +targetEntityType: node +bundle: facility +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_facility_: + weight: 103 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_facility_image: + weight: 102 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/facility/config/install/core.entity_view_display.node.facility.teaser.yml b/modules/fahad/facility/config/install/core.entity_view_display.node.facility.teaser.yml new file mode 100644 index 0000000..035fe40 --- /dev/null +++ b/modules/fahad/facility/config/install/core.entity_view_display.node.facility.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.facility.body + - node.type.facility + module: + - text + - user + enforced: + module: + - facility +id: node.facility.teaser +targetEntityType: node +bundle: facility +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/fahad/facility/config/install/field.field.node.facility.body.yml b/modules/fahad/facility/config/install/field.field.node.facility.body.yml new file mode 100644 index 0000000..19634de --- /dev/null +++ b/modules/fahad/facility/config/install/field.field.node.facility.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.facility + module: + - text + enforced: + module: + - facility +id: node.facility.body +field_name: body +entity_type: node +bundle: facility +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/fahad/facility/config/install/field.field.node.facility.field_facility_.yml b/modules/fahad/facility/config/install/field.field.node.facility.field_facility_.yml new file mode 100644 index 0000000..96146f2 --- /dev/null +++ b/modules/fahad/facility/config/install/field.field.node.facility.field_facility_.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facility_ + - node.type.facility + module: + - link + enforced: + module: + - facility +id: node.facility.field_facility_ +field_name: field_facility_ +entity_type: node +bundle: facility +label: 'facility link' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/fahad/facility/config/install/field.field.node.facility.field_facility_image.yml b/modules/fahad/facility/config/install/field.field.node.facility.field_facility_image.yml new file mode 100644 index 0000000..3cbc23c --- /dev/null +++ b/modules/fahad/facility/config/install/field.field.node.facility.field_facility_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facility_image + - node.type.facility + module: + - image + enforced: + module: + - facility +id: node.facility.field_facility_image +field_name: field_facility_image +entity_type: node +bundle: facility +label: 'facility image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + 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/fahad/facility/config/install/field.storage.node.field_facility_.yml b/modules/fahad/facility/config/install/field.storage.node.field_facility_.yml new file mode 100644 index 0000000..02b2c92 --- /dev/null +++ b/modules/fahad/facility/config/install/field.storage.node.field_facility_.yml @@ -0,0 +1,22 @@ +uuid: 0fb10736-72c3-46f9-bd50-0380df9ca0e8 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - facility +id: node.field_facility_ +field_name: field_facility_ +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/fahad/facility/config/install/field.storage.node.field_facility_image.yml b/modules/fahad/facility/config/install/field.storage.node.field_facility_image.yml new file mode 100644 index 0000000..b1dc938 --- /dev/null +++ b/modules/fahad/facility/config/install/field.storage.node.field_facility_image.yml @@ -0,0 +1,33 @@ +uuid: e5ae6aa1-7ca8-47bb-99a1-926d47c3427f +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - facility +id: node.field_facility_image +field_name: field_facility_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/fahad/facility/config/install/migrate_plus.migration.facilities.yml b/modules/fahad/facility/config/install/migrate_plus.migration.facilities.yml new file mode 100644 index 0000000..37ea4de --- /dev/null +++ b/modules/fahad/facility/config/install/migrate_plus.migration.facilities.yml @@ -0,0 +1,46 @@ +langcode: en +status: true +dependencies: { } +id: facilities +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV Facility' +source: + plugin: csv + path: /var/www/html/project/docroot/facility.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: facility + source_path: + - + plugin: skip_on_empty + method: process + source: phuto + - + plugin: concat + delimiter: / + source: + - constants/file_source + - phuto + title: title + body: body + field_facility_: email + field_facility_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/facility/config/install/node.type.facility.yml b/modules/fahad/facility/config/install/node.type.facility.yml new file mode 100644 index 0000000..37eee05 --- /dev/null +++ b/modules/fahad/facility/config/install/node.type.facility.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - facility +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Facility +type: facility +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/facility/config/install/views.view.facilities.yml b/modules/fahad/facility/config/install/views.view.facilities.yml new file mode 100644 index 0000000..3049f64 --- /dev/null +++ b/modules/fahad/facility/config/install/views.view.facilities.yml @@ -0,0 +1,212 @@ +langcode: en +status: true +dependencies: + config: + - node.type.facility + - system.menu.main + module: + - node + - user + - views_bootstrap +id: facilities +label: Facilities +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: views_bootstrap_grid + options: + row_class: '' + default_row_class: true + uses_fields: false + alignment: horizontal + columns: '2' + col_xs: col-xs-6 + col_sm: col-sm-6 + col_md: col-md-6 + col_lg: col-lg-6 + row: + type: 'entity:node' + options: + relationship: none + view_mode: default + 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: + facility: facility + 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: Facilities + 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: facilities + menu: + type: normal + title: Facilities + description: '' + expanded: true + parent: '' + weight: -38 + context: '0' + menu_name: main + 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/fahad/facility/facility.info.yml b/modules/fahad/facility/facility.info.yml new file mode 100644 index 0000000..97a55f0 --- /dev/null +++ b/modules/fahad/facility/facility.info.yml @@ -0,0 +1,14 @@ +name: 'facility' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:image + - drupal:link + - drupal:path + - drupal:user + - drupal:node + - drupal:file + - drupal:menu_ui diff --git a/modules/fahad/facility/facility.module b/modules/fahad/facility/facility.module new file mode 100644 index 0000000..ee4bd23 --- /dev/null +++ b/modules/fahad/facility/facility.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains facility.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function facility_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the facility module. + case 'help.page.facility': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function facility_theme() { + return [ + 'facility' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/facility/templates/facility.html.twig b/modules/fahad/facility/templates/facility.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/facility/templates/facility.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/facility/tests/src/Functional/LoadTest.php b/modules/fahad/facility/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..10db5fe --- /dev/null +++ b/modules/fahad/facility/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\facility\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group facility + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['facility']; + + /** + * 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/fahad/faq/composer.json b/modules/fahad/faq/composer.json new file mode 100644 index 0000000..17c3f4b --- /dev/null +++ b/modules/fahad/faq/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/faq", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/faq", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/faq", + "source": "http://cgit.drupalcode.org/faq" + }, + "require": { } +} diff --git a/modules/fahad/faq/config/install/core.entity_form_display.node.faq.default.yml b/modules/fahad/faq/config/install/core.entity_form_display.node.faq.default.yml new file mode 100644 index 0000000..e33492b --- /dev/null +++ b/modules/fahad/faq/config/install/core.entity_form_display.node.faq.default.yml @@ -0,0 +1,84 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.faq.body + - node.type.faq + module: + - path + - text + enforced: + module: + - faq +id: node.faq.default +targetEntityType: node +bundle: faq +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: { } + 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/fahad/faq/config/install/core.entity_view_display.node.faq.default.yml b/modules/fahad/faq/config/install/core.entity_view_display.node.faq.default.yml new file mode 100644 index 0000000..4524968 --- /dev/null +++ b/modules/fahad/faq/config/install/core.entity_view_display.node.faq.default.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.faq.body + - node.type.faq + module: + - text + - user + enforced: + module: + - faq +id: node.faq.default +targetEntityType: node +bundle: faq +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/faq/config/install/core.entity_view_display.node.faq.teaser.yml b/modules/fahad/faq/config/install/core.entity_view_display.node.faq.teaser.yml new file mode 100644 index 0000000..1396f0f --- /dev/null +++ b/modules/fahad/faq/config/install/core.entity_view_display.node.faq.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.faq.body + - node.type.faq + module: + - text + - user + enforced: + module: + - faq +id: node.faq.teaser +targetEntityType: node +bundle: faq +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/fahad/faq/config/install/field.field.node.faq.body.yml b/modules/fahad/faq/config/install/field.field.node.faq.body.yml new file mode 100644 index 0000000..d0c6a67 --- /dev/null +++ b/modules/fahad/faq/config/install/field.field.node.faq.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.faq + module: + - text + enforced: + module: + - faq +id: node.faq.body +field_name: body +entity_type: node +bundle: faq +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/fahad/faq/config/install/migrate_plus.migration.faqs.yml b/modules/fahad/faq/config/install/migrate_plus.migration.faqs.yml new file mode 100644 index 0000000..5439881 --- /dev/null +++ b/modules/fahad/faq/config/install/migrate_plus.migration.faqs.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: { } +id: faqs +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV for FAQS' +source: + plugin: csv + path: /var/www/html/project/docroot/FAQ.csv + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: faq + title: title + body: body +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/faq/config/install/node.type.faq.yml b/modules/fahad/faq/config/install/node.type.faq.yml new file mode 100644 index 0000000..12b86e5 --- /dev/null +++ b/modules/fahad/faq/config/install/node.type.faq.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - faq +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: FAQ +type: faq +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/faq/config/install/views.view.faqs.yml b/modules/fahad/faq/config/install/views.view.faqs.yml new file mode 100644 index 0000000..a138da1 --- /dev/null +++ b/modules/fahad/faq/config/install/views.view.faqs.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.faq + - system.menu.main + module: + - node + - user +id: faqs +label: FAQs +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: full + 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: + faq: faq + 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: FAQs + 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: faqs + menu: + type: normal + title: Faqs + description: '' + expanded: false + parent: 'menu_link_content:f22943a5-ddf8-4836-9e21-c522d862b8f5' + weight: 0 + context: '0' + menu_name: main + 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/fahad/faq/faq.info.yml b/modules/fahad/faq/faq.info.yml new file mode 100644 index 0000000..5cdd49f --- /dev/null +++ b/modules/fahad/faq/faq.info.yml @@ -0,0 +1,11 @@ +name: 'faq' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui
\ No newline at end of file diff --git a/modules/fahad/faq/faq.module b/modules/fahad/faq/faq.module new file mode 100644 index 0000000..025f6b6 --- /dev/null +++ b/modules/fahad/faq/faq.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains faq.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function faq_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the faq module. + case 'help.page.faq': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function faq_theme() { + return [ + 'faq' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/faq/templates/faq.html.twig b/modules/fahad/faq/templates/faq.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/faq/templates/faq.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/faq/tests/src/Functional/LoadTest.php b/modules/fahad/faq/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..e27bb60 --- /dev/null +++ b/modules/fahad/faq/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\faq\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group faq + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['faq']; + + /** + * 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/fahad/festivals/composer.json b/modules/fahad/festivals/composer.json new file mode 100644 index 0000000..864c0a3 --- /dev/null +++ b/modules/fahad/festivals/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/festivals", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/festivals", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/festivals", + "source": "http://cgit.drupalcode.org/festivals" + }, + "require": { } +} diff --git a/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml b/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml new file mode 100644 index 0000000..11c97dd --- /dev/null +++ b/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml @@ -0,0 +1,114 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.festivals.body + - field.field.node.festivals.field_fastival_link + - field.field.node.festivals.field_festival_file + - field.field.node.festivals.field_festival_image + - image.style.thumbnail + - node.type.festivals + module: + - file + - image + - link + - path + - text + enforced: + module: + - festivals +id: node.festivals.default +targetEntityType: node +bundle: festivals +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_fastival_link: + weight: 123 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_festival_file: + weight: 124 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_festival_image: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + 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/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml new file mode 100644 index 0000000..f99a9f8 --- /dev/null +++ b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml @@ -0,0 +1,66 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.festivals.body + - field.field.node.festivals.field_fastival_link + - field.field.node.festivals.field_festival_file + - field.field.node.festivals.field_festival_image + - node.type.festivals + module: + - file + - image + - link + - text + - user + enforced: + module: + - festivals +id: node.festivals.default +targetEntityType: node +bundle: festivals +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_fastival_link: + weight: 103 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_festival_file: + weight: 104 + label: hidden + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_festival_image: + weight: 102 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml new file mode 100644 index 0000000..cfca1d9 --- /dev/null +++ b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.festivals.body + - node.type.festivals + module: + - text + - user + enforced: + module: + - festivals +id: node.festivals.teaser +targetEntityType: node +bundle: festivals +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/fahad/festivals/config/install/field.field.node.festivals.body.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.body.yml new file mode 100644 index 0000000..630c8df --- /dev/null +++ b/modules/fahad/festivals/config/install/field.field.node.festivals.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.festivals + module: + - text + enforced: + module: + - festivals +id: node.festivals.body +field_name: body +entity_type: node +bundle: festivals +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/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml new file mode 100644 index 0000000..bf12331 --- /dev/null +++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_fastival_link + - node.type.festivals + module: + - link + enforced: + module: + - festivals +id: node.festivals.field_fastival_link +field_name: field_fastival_link +entity_type: node +bundle: festivals +label: fastival_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 2 +field_type: link diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml new file mode 100644 index 0000000..36a39e4 --- /dev/null +++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_festival_file + - node.type.festivals + module: + - file + enforced: + module: + - festivals +id: node.festivals.field_festival_file +field_name: field_festival_file +entity_type: node +bundle: festivals +label: festival_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf img docx doc pptxt ppt' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml new file mode 100644 index 0000000..49a456f --- /dev/null +++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_festival_image + - node.type.festivals + module: + - image + enforced: + module: + - festivals +id: node.festivals.field_festival_image +field_name: field_festival_image +entity_type: node +bundle: festivals +label: festival_image +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: true + 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/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml b/modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml new file mode 100644 index 0000000..c978af5 --- /dev/null +++ b/modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml @@ -0,0 +1,22 @@ +uuid: b246b8f3-2171-4bbe-a01a-30c19cfd5699 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - festivals +id: node.field_fastival_link +field_name: field_fastival_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/fahad/festivals/config/install/field.storage.node.field_festival_file.yml b/modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml new file mode 100644 index 0000000..ed54480 --- /dev/null +++ b/modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml @@ -0,0 +1,26 @@ +uuid: 51f79e04-9685-4f7e-93b7-72d00c18eb26 +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - festivals +id: node.field_festival_file +field_name: field_festival_file +entity_type: node +type: file +settings: + display_field: true + 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/fahad/festivals/config/install/field.storage.node.field_festival_image.yml b/modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml new file mode 100644 index 0000000..13347c6 --- /dev/null +++ b/modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml @@ -0,0 +1,33 @@ +uuid: 6630d2e4-2444-4c5c-b59d-a57438eb2a60 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - festivals +id: node.field_festival_image +field_name: field_festival_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: 2 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/festivals/config/install/migrate_plus.migration.festivals.yml b/modules/fahad/festivals/config/install/migrate_plus.migration.festivals.yml new file mode 100644 index 0000000..0493781 --- /dev/null +++ b/modules/fahad/festivals/config/install/migrate_plus.migration.festivals.yml @@ -0,0 +1,61 @@ +langcode: en +status: true +dependencies: { } +id: festivals +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV FESTIVALS' +source: + plugin: csv + path: /var/www/html/project/docroot/festivals.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: festivals + source_path: + - + plugin: skip_on_empty + method: process + source: phuto + - + plugin: concat + delimiter: / + source: + - constants/file_source + - phuto + source_path_two: + - + plugin: skip_on_empty + method: process + source: file + - + plugin: concat + delimiter: / + source: + - constants/file_source + - file + title: title + body: body + field_fastival_link: link + field_festival_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_festival_file: + plugin: file_import + source: '@source_path_two' + destination: constants/file_dest +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/festivals/config/install/node.type.festivals.yml b/modules/fahad/festivals/config/install/node.type.festivals.yml new file mode 100644 index 0000000..a0e5e2a --- /dev/null +++ b/modules/fahad/festivals/config/install/node.type.festivals.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - festivals +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Festivals +type: festivals +description: 'Various Cultural and related Events' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/festivals/config/install/views.view.festivals.yml b/modules/fahad/festivals/config/install/views.view.festivals.yml new file mode 100644 index 0000000..0d2e235 --- /dev/null +++ b/modules/fahad/festivals/config/install/views.view.festivals.yml @@ -0,0 +1,197 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.festivals + - system.menu.main + module: + - node + - user +id: festivals +label: Festivals +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: full + 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: + festivals: festivals + 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: Festivals + 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: festivals + menu: + type: normal + title: Festivals + menu_name: main + weight: -44 + 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/fahad/festivals/festivals.info.yml b/modules/fahad/festivals/festivals.info.yml new file mode 100644 index 0000000..1dc41d2 --- /dev/null +++ b/modules/fahad/festivals/festivals.info.yml @@ -0,0 +1,14 @@ +name: 'festivals' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui + - drupal:image + - drupal:file + - drupal:link
\ No newline at end of file diff --git a/modules/fahad/festivals/festivals.module b/modules/fahad/festivals/festivals.module new file mode 100644 index 0000000..01a7a72 --- /dev/null +++ b/modules/fahad/festivals/festivals.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains festivals.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function festivals_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the festivals module. + case 'help.page.festivals': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function festivals_theme() { + return [ + 'festivals' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/festivals/templates/festivals.html.twig b/modules/fahad/festivals/templates/festivals.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/festivals/templates/festivals.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/festivals/tests/src/Functional/LoadTest.php b/modules/fahad/festivals/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..9e7d3e5 --- /dev/null +++ b/modules/fahad/festivals/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\festivals\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group festivals + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['festivals']; + + /** + * 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/fahad/industry_partners/composer.json b/modules/fahad/industry_partners/composer.json new file mode 100644 index 0000000..dcf57cd --- /dev/null +++ b/modules/fahad/industry_partners/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/industry_partners", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/industry_partners", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/industry_partners", + "source": "http://cgit.drupalcode.org/industry_partners" + }, + "require": { } +} diff --git a/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml b/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml new file mode 100644 index 0000000..4eecfbe --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml @@ -0,0 +1,105 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.industry_partners.body + - field.field.node.industry_partners.field_company_logo + - field.field.node.industry_partners.field_company_website + - image.style.thumbnail + - node.type.industry_partners + module: + - image + - link + - path + - text + enforced: + module: + - industry_partners +id: node.industry_partners.default +targetEntityType: node +bundle: industry_partners +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_company_logo: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_company_website: + weight: 123 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + 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/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml new file mode 100644 index 0000000..e08a9fb --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.industry_partners.body + - field.field.node.industry_partners.field_company_logo + - field.field.node.industry_partners.field_company_website + - node.type.industry_partners + module: + - image + - link + - text + - user + enforced: + module: + - industry_partners +id: node.industry_partners.default +targetEntityType: node +bundle: industry_partners +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_company_logo: + weight: 102 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_company_website: + weight: 103 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml new file mode 100644 index 0000000..e6f8669 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.industry_partners.body + - node.type.industry_partners + module: + - text + - user + enforced: + module: + - industry_partners +id: node.industry_partners.teaser +targetEntityType: node +bundle: industry_partners +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/fahad/industry_partners/config/install/field.field.node.industry_partners.body.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.body.yml new file mode 100644 index 0000000..7e2d30b --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.industry_partners + module: + - text + enforced: + module: + - industry_partners +id: node.industry_partners.body +field_name: body +entity_type: node +bundle: industry_partners +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/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml new file mode 100644 index 0000000..874aa06 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_logo + - node.type.industry_partners + module: + - image + enforced: + module: + - industry_partners +id: node.industry_partners.field_company_logo +field_name: field_company_logo +entity_type: node +bundle: industry_partners +label: 'Company Logo' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: 500x500 + 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/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml new file mode 100644 index 0000000..1c6338e --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_website + - node.type.industry_partners + module: + - link + enforced: + module: + - industry_partners +id: node.industry_partners.field_company_website +field_name: field_company_website +entity_type: node +bundle: industry_partners +label: 'Company Website' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml new file mode 100644 index 0000000..3f2b0d0 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml @@ -0,0 +1,33 @@ +uuid: 8a85d339-64ca-45eb-9f99-89d032c8bef9 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - industry_partners +id: node.field_company_logo +field_name: field_company_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/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml new file mode 100644 index 0000000..27b7277 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml @@ -0,0 +1,22 @@ +uuid: a77610e5-93fa-4b59-8e85-58016211a438 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - industry_partners +id: node.field_company_website +field_name: field_company_website +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/fahad/industry_partners/config/install/migrate_plus.migration.industry_partners.yml b/modules/fahad/industry_partners/config/install/migrate_plus.migration.industry_partners.yml new file mode 100644 index 0000000..a578d3c --- /dev/null +++ b/modules/fahad/industry_partners/config/install/migrate_plus.migration.industry_partners.yml @@ -0,0 +1,46 @@ +langcode: en +status: true +dependencies: { } +id: industry_partners +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV Industry Partners' +source: + plugin: csv + path: /var/www/html/project/docroot/industry.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: industry_partners + source_path: + - + plugin: skip_on_empty + method: process + source: phuto + - + plugin: concat + delimiter: / + source: + - constants/file_source + - phuto + title: title + body: body + field_company_website: link + field_company_logo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/industry_partners/config/install/node.type.industry_partners.yml b/modules/fahad/industry_partners/config/install/node.type.industry_partners.yml new file mode 100644 index 0000000..857f3e0 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/node.type.industry_partners.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - industry_partners +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Industry Partners' +type: industry_partners +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/industry_partners/config/install/views.view.industry_partners_view.yml b/modules/fahad/industry_partners/config/install/views.view.industry_partners_view.yml new file mode 100644 index 0000000..4d544e4 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/views.view.industry_partners_view.yml @@ -0,0 +1,212 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.industry_partners + - system.menu.main + module: + - node + - user + - views_bootstrap +id: industry_partners_view +label: 'Industry Partners' +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: views_bootstrap_grid + options: + row_class: '' + default_row_class: true + uses_fields: false + alignment: horizontal + columns: '2' + col_xs: col-xs-6 + col_sm: col-sm-6 + col_md: col-md-6 + col_lg: col-lg-6 + row: + type: 'entity:node' + options: + view_mode: full + 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: + industry_partners: industry_partners + 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: 'Industry Partners' + 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: industry-partners + menu: + type: normal + title: 'Industry Partners' + description: '' + expanded: false + parent: 'menu_link_content:feea89d0-7c4d-492d-bc5e-42ae502ecc4b' + weight: 0 + context: '0' + menu_name: main + 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/fahad/industry_partners/industry_partners.info.yml b/modules/fahad/industry_partners/industry_partners.info.yml new file mode 100644 index 0000000..07b2f9d --- /dev/null +++ b/modules/fahad/industry_partners/industry_partners.info.yml @@ -0,0 +1,15 @@ +name: 'industry_partners' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui + - drupal:image + - drupal:file + - drupal:link + - drupal:datetime
\ No newline at end of file diff --git a/modules/fahad/industry_partners/industry_partners.module b/modules/fahad/industry_partners/industry_partners.module new file mode 100644 index 0000000..fb219dd --- /dev/null +++ b/modules/fahad/industry_partners/industry_partners.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains industry_partners.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function industry_partners_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the industry_partners module. + case 'help.page.industry_partners': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function industry_partners_theme() { + return [ + 'industry_partners' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/industry_partners/templates/industry-partners.html.twig b/modules/fahad/industry_partners/templates/industry-partners.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/industry_partners/templates/industry-partners.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php b/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..569b545 --- /dev/null +++ b/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\industry_partners\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group industry_partners + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['industry_partners']; + + /** + * 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/fahad/notification/composer.json b/modules/fahad/notification/composer.json new file mode 100644 index 0000000..4fa3d4a --- /dev/null +++ b/modules/fahad/notification/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/notification", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/notification", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/notification", + "source": "http://cgit.drupalcode.org/notification" + }, + "require": { } +} diff --git a/modules/fahad/notification/config/install/core.entity_form_display.node.notification.default.yml b/modules/fahad/notification/config/install/core.entity_form_display.node.notification.default.yml new file mode 100644 index 0000000..2045610 --- /dev/null +++ b/modules/fahad/notification/config/install/core.entity_form_display.node.notification.default.yml @@ -0,0 +1,111 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.notification.body + - field.field.node.notification.field_notification_date + - field.field.node.notification.field_notification_file + - field.field.node.notification.field_notitfication_category + - node.type.notification + module: + - datetime + - file + - path + - text + enforced: + module: + - notification +id: node.notification.default +targetEntityType: node +bundle: notification +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_notification_date: + weight: 124 + settings: { } + third_party_settings: { } + type: datetime_default + region: content + field_notification_file: + weight: 122 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_notitfication_category: + weight: 123 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + 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/fahad/notification/config/install/core.entity_view_display.node.notification.default.yml b/modules/fahad/notification/config/install/core.entity_view_display.node.notification.default.yml new file mode 100644 index 0000000..1816e1c --- /dev/null +++ b/modules/fahad/notification/config/install/core.entity_view_display.node.notification.default.yml @@ -0,0 +1,61 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.notification.body + - field.field.node.notification.field_notification_date + - field.field.node.notification.field_notification_file + - field.field.node.notification.field_notitfication_category + - node.type.notification + module: + - datetime + - file + - text + - user + enforced: + module: + - notification +id: node.notification.default +targetEntityType: node +bundle: notification +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_notification_date: + weight: 104 + label: hidden + settings: + format_type: medium + timezone_override: '' + third_party_settings: { } + type: datetime_default + region: content + field_notification_file: + weight: 102 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_notitfication_category: + weight: 103 + label: hidden + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/fahad/notification/config/install/core.entity_view_display.node.notification.teaser.yml b/modules/fahad/notification/config/install/core.entity_view_display.node.notification.teaser.yml new file mode 100644 index 0000000..6a72474 --- /dev/null +++ b/modules/fahad/notification/config/install/core.entity_view_display.node.notification.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.notification.body + - node.type.notification + module: + - text + - user + enforced: + module: + - notification +id: node.notification.teaser +targetEntityType: node +bundle: notification +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/fahad/notification/config/install/field.field.node.notification.body.yml b/modules/fahad/notification/config/install/field.field.node.notification.body.yml new file mode 100644 index 0000000..3509680 --- /dev/null +++ b/modules/fahad/notification/config/install/field.field.node.notification.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.notification + module: + - text + enforced: + module: + - notification +id: node.notification.body +field_name: body +entity_type: node +bundle: notification +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/fahad/notification/config/install/field.field.node.notification.field_notification_date.yml b/modules/fahad/notification/config/install/field.field.node.notification.field_notification_date.yml new file mode 100644 index 0000000..0953a9d --- /dev/null +++ b/modules/fahad/notification/config/install/field.field.node.notification.field_notification_date.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_notification_date + - node.type.notification + module: + - datetime + enforced: + module: + - notification +id: node.notification.field_notification_date +field_name: field_notification_date +entity_type: node +bundle: notification +label: notification_date +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: datetime diff --git a/modules/fahad/notification/config/install/field.field.node.notification.field_notification_file.yml b/modules/fahad/notification/config/install/field.field.node.notification.field_notification_file.yml new file mode 100644 index 0000000..9c77b40 --- /dev/null +++ b/modules/fahad/notification/config/install/field.field.node.notification.field_notification_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_notification_file + - node.type.notification + module: + - file + enforced: + module: + - notification +id: node.notification.field_notification_file +field_name: field_notification_file +entity_type: node +bundle: notification +label: Notification_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf doc docx' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/notification/config/install/field.field.node.notification.field_notitfication_category.yml b/modules/fahad/notification/config/install/field.field.node.notification.field_notitfication_category.yml new file mode 100644 index 0000000..6602e9b --- /dev/null +++ b/modules/fahad/notification/config/install/field.field.node.notification.field_notitfication_category.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_notitfication_category + - node.type.notification + - taxonomy.vocabulary.notification_category + enforced: + module: + - notification +id: node.notification.field_notitfication_category +field_name: field_notitfication_category +entity_type: node +bundle: notification +label: notitfication_category +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + notification_category: notification_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/fahad/notification/config/install/field.storage.node.field_notification_date.yml b/modules/fahad/notification/config/install/field.storage.node.field_notification_date.yml new file mode 100644 index 0000000..745c6ab --- /dev/null +++ b/modules/fahad/notification/config/install/field.storage.node.field_notification_date.yml @@ -0,0 +1,23 @@ +uuid: 4c7c0c52-926b-437f-aa89-3426d718c443 +langcode: en +status: true +dependencies: + module: + - datetime + - node + enforced: + module: + - notification +id: node.field_notification_date +field_name: field_notification_date +entity_type: node +type: datetime +settings: + datetime_type: datetime +module: datetime +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/notification/config/install/field.storage.node.field_notification_file.yml b/modules/fahad/notification/config/install/field.storage.node.field_notification_file.yml new file mode 100644 index 0000000..a4fa95d --- /dev/null +++ b/modules/fahad/notification/config/install/field.storage.node.field_notification_file.yml @@ -0,0 +1,26 @@ +uuid: b9fd98b9-1d46-4b69-b8ba-4bfac93b06f9 +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - notification +id: node.field_notification_file +field_name: field_notification_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/fahad/notification/config/install/field.storage.node.field_notitfication_category.yml b/modules/fahad/notification/config/install/field.storage.node.field_notitfication_category.yml new file mode 100644 index 0000000..2c8386c --- /dev/null +++ b/modules/fahad/notification/config/install/field.storage.node.field_notitfication_category.yml @@ -0,0 +1,23 @@ +uuid: 96307a90-43a2-4378-8535-af12f3ca1543 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - notification +id: node.field_notitfication_category +field_name: field_notitfication_category +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/fahad/notification/config/install/migrate_plus.migration.notifications.yml b/modules/fahad/notification/config/install/migrate_plus.migration.notifications.yml new file mode 100644 index 0000000..9b2ff05 --- /dev/null +++ b/modules/fahad/notification/config/install/migrate_plus.migration.notifications.yml @@ -0,0 +1,59 @@ +langcode: en +status: true +dependencies: { } +id: notifications +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV for Notifications' +source: + plugin: csv + path: /var/www/html/project/docroot/notification.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: notification + source_path_two: + - + plugin: skip_on_empty + method: process + source: file + - + plugin: concat + delimiter: / + source: + - constants/file_source + - file + title: title + body: body + field_notification_file: + plugin: file_import + source: '@source_path_two' + destination: constants/file_dest + field_notitfication_category: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: notification_category + source: category + field_notification_date: + - + plugin: format_date + from_format: 'd/m/Y H:i:s' + to_format: 'Y-m-d\TH:i:s' + from_timezone: Asia/Kolkata + to_timezone: UTC + source: date +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/notification/config/install/node.type.notification.yml b/modules/fahad/notification/config/install/node.type.notification.yml new file mode 100644 index 0000000..5c08eda --- /dev/null +++ b/modules/fahad/notification/config/install/node.type.notification.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - notification +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Notification +type: notification +description: 'College Notifications' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/notification/config/install/taxonomy.vocabulary.notification_category.yml b/modules/fahad/notification/config/install/taxonomy.vocabulary.notification_category.yml new file mode 100644 index 0000000..c297c09 --- /dev/null +++ b/modules/fahad/notification/config/install/taxonomy.vocabulary.notification_category.yml @@ -0,0 +1,12 @@ +uuid: 0c1e3fee-8ad7-4f26-bbb2-68c2b616ac23 +langcode: en +status: true +dependencies: + enforced: + module: + - notification +name: 'Notification Category' +vid: notification_category +description: 'Category of notification' +hierarchy: 0 +weight: 0 diff --git a/modules/fahad/notification/config/install/views.view.notifications.yml b/modules/fahad/notification/config/install/views.view.notifications.yml new file mode 100644 index 0000000..1b9e631 --- /dev/null +++ b/modules/fahad/notification/config/install/views.view.notifications.yml @@ -0,0 +1,197 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.notification + - system.menu.main + module: + - node + - user +id: notifications +label: Notifications +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: + notification: notification + 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: Notifications + 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: notifications + menu: + type: normal + title: Notifications + menu_name: main + weight: -42 + 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/fahad/notification/notification.info.yml b/modules/fahad/notification/notification.info.yml new file mode 100644 index 0000000..715efc0 --- /dev/null +++ b/modules/fahad/notification/notification.info.yml @@ -0,0 +1,14 @@ +name: 'notification' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui + - drupal:file + - drupal:link + - drupal:taxonomy
\ No newline at end of file diff --git a/modules/fahad/notification/notification.module b/modules/fahad/notification/notification.module new file mode 100644 index 0000000..5b34f30 --- /dev/null +++ b/modules/fahad/notification/notification.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains notification.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function notification_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the notification module. + case 'help.page.notification': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function notification_theme() { + return [ + 'notification' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/notification/templates/notification.html.twig b/modules/fahad/notification/templates/notification.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/notification/templates/notification.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/notification/tests/src/Functional/LoadTest.php b/modules/fahad/notification/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..1f1880b --- /dev/null +++ b/modules/fahad/notification/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\notification\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group notification + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['notification']; + + /** + * 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/fahad/staff/composer.json b/modules/fahad/staff/composer.json new file mode 100644 index 0000000..7ecc5b7 --- /dev/null +++ b/modules/fahad/staff/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/staff", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/staff", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/staff", + "source": "http://cgit.drupalcode.org/staff" + }, + "require": { } +} diff --git a/modules/fahad/staff/config/install/core.entity_form_display.node.staff.default.yml b/modules/fahad/staff/config/install/core.entity_form_display.node.staff.default.yml new file mode 100644 index 0000000..3c57990 --- /dev/null +++ b/modules/fahad/staff/config/install/core.entity_form_display.node.staff.default.yml @@ -0,0 +1,111 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.staff.body + - field.field.node.staff.field_designation + - field.field.node.staff.field_staff_email + - field.field.node.staff.field_staff_image + - image.style.thumbnail + - node.type.staff + module: + - image + - path + - text + enforced: + module: + - staff +id: node.staff.default +targetEntityType: node +bundle: staff +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_designation: + weight: 125 + settings: { } + third_party_settings: { } + type: options_select + region: content + field_staff_email: + weight: 124 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: email_default + region: content + field_staff_image: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + 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/fahad/staff/config/install/core.entity_view_display.node.staff.default.yml b/modules/fahad/staff/config/install/core.entity_view_display.node.staff.default.yml new file mode 100644 index 0000000..33d49bc --- /dev/null +++ b/modules/fahad/staff/config/install/core.entity_view_display.node.staff.default.yml @@ -0,0 +1,59 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.staff.body + - field.field.node.staff.field_designation + - field.field.node.staff.field_staff_email + - field.field.node.staff.field_staff_image + - node.type.staff + module: + - image + - options + - text + - user + enforced: + module: + - staff +id: node.staff.default +targetEntityType: node +bundle: staff +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_designation: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: list_default + region: content + field_staff_email: + weight: 104 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_staff_image: + weight: 102 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/fahad/staff/config/install/core.entity_view_display.node.staff.teaser.yml b/modules/fahad/staff/config/install/core.entity_view_display.node.staff.teaser.yml new file mode 100644 index 0000000..0e8c256 --- /dev/null +++ b/modules/fahad/staff/config/install/core.entity_view_display.node.staff.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.staff.body + - node.type.staff + module: + - text + - user + enforced: + module: + - staff +id: node.staff.teaser +targetEntityType: node +bundle: staff +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/fahad/staff/config/install/field.field.node.staff.body.yml b/modules/fahad/staff/config/install/field.field.node.staff.body.yml new file mode 100644 index 0000000..5120564 --- /dev/null +++ b/modules/fahad/staff/config/install/field.field.node.staff.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.staff + module: + - text + enforced: + module: + - staff +id: node.staff.body +field_name: body +entity_type: node +bundle: staff +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/fahad/staff/config/install/field.field.node.staff.field_designation.yml b/modules/fahad/staff/config/install/field.field.node.staff.field_designation.yml new file mode 100644 index 0000000..9843775 --- /dev/null +++ b/modules/fahad/staff/config/install/field.field.node.staff.field_designation.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_designation + - node.type.staff + module: + - options + enforced: + module: + - staff +id: node.staff.field_designation +field_name: field_designation +entity_type: node +bundle: staff +label: designation +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/fahad/staff/config/install/field.field.node.staff.field_staff_email.yml b/modules/fahad/staff/config/install/field.field.node.staff.field_staff_email.yml new file mode 100644 index 0000000..0ae10fb --- /dev/null +++ b/modules/fahad/staff/config/install/field.field.node.staff.field_staff_email.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_staff_email + - node.type.staff + enforced: + module: + - staff +id: node.staff.field_staff_email +field_name: field_staff_email +entity_type: node +bundle: staff +label: staff_email +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: email diff --git a/modules/fahad/staff/config/install/field.field.node.staff.field_staff_image.yml b/modules/fahad/staff/config/install/field.field.node.staff.field_staff_image.yml new file mode 100644 index 0000000..05ea0cc --- /dev/null +++ b/modules/fahad/staff/config/install/field.field.node.staff.field_staff_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_staff_image + - node.type.staff + module: + - image + enforced: + module: + - staff +id: node.staff.field_staff_image +field_name: field_staff_image +entity_type: node +bundle: staff +label: staff_image +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '500 KB' + max_resolution: 600x600 + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: 'Staff Image' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/fahad/staff/config/install/field.storage.node.field_designation.yml b/modules/fahad/staff/config/install/field.storage.node.field_designation.yml new file mode 100644 index 0000000..a45bc21 --- /dev/null +++ b/modules/fahad/staff/config/install/field.storage.node.field_designation.yml @@ -0,0 +1,33 @@ +uuid: 2bb0e6d9-6746-4705-9233-68b7d5c544cc +langcode: en +status: true +dependencies: + module: + - node + - options + enforced: + module: + - staff +id: node.field_designation +field_name: field_designation +entity_type: node +type: list_string +settings: + allowed_values: + - + value: 'Office Assistant' + label: 'Office Assistant' + - + value: Accountant + label: Accountant + - + value: 'Multi-Tasking Staff' + label: 'Multi-Tasking Staff' + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/staff/config/install/field.storage.node.field_staff_email.yml b/modules/fahad/staff/config/install/field.storage.node.field_staff_email.yml new file mode 100644 index 0000000..4294e72 --- /dev/null +++ b/modules/fahad/staff/config/install/field.storage.node.field_staff_email.yml @@ -0,0 +1,21 @@ +uuid: 85c29d4c-a86b-4bc9-ac2e-8713593c0a69 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - staff +id: node.field_staff_email +field_name: field_staff_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/fahad/staff/config/install/field.storage.node.field_staff_image.yml b/modules/fahad/staff/config/install/field.storage.node.field_staff_image.yml new file mode 100644 index 0000000..12e2600 --- /dev/null +++ b/modules/fahad/staff/config/install/field.storage.node.field_staff_image.yml @@ -0,0 +1,33 @@ +uuid: e4c2a11d-de09-411d-872a-9d3e687921c8 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - staff +id: node.field_staff_image +field_name: field_staff_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/fahad/staff/config/install/migrate_plus.migration.staff.yml b/modules/fahad/staff/config/install/migrate_plus.migration.staff.yml new file mode 100644 index 0000000..64c31e5 --- /dev/null +++ b/modules/fahad/staff/config/install/migrate_plus.migration.staff.yml @@ -0,0 +1,48 @@ +uuid: 636c412b-2d83-448e-be13-107ea9abbaaf +langcode: en +status: true +dependencies: { } +id: staff +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: null +label: 'Custom Content migration from CSV Staff' +source: + plugin: csv + path: /var/www/html/project/docroot/staff.csv + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/html/project/docroot/fac_images + file_dest: 'public://fac_images/' +process: + type: + plugin: default_value + default_value: staff + source_path: + - + plugin: skip_on_empty + method: process + source: phuto + - + plugin: concat + delimiter: / + source: + - constants/file_source + - phuto + title: title + body: body + field_staff_email: email + field_designation: designation + field_staff_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' +migration_dependencies: + required: { } + optional: { } diff --git a/modules/fahad/staff/config/install/node.type.staff.yml b/modules/fahad/staff/config/install/node.type.staff.yml new file mode 100644 index 0000000..76845fd --- /dev/null +++ b/modules/fahad/staff/config/install/node.type.staff.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - staff +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: staff +type: staff +description: 'Staffs Of IIITT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/staff/config/install/views.view.staff.yml b/modules/fahad/staff/config/install/views.view.staff.yml new file mode 100644 index 0000000..577f945 --- /dev/null +++ b/modules/fahad/staff/config/install/views.view.staff.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - node.type.staff + - system.menu.main + module: + - node + - user +id: staff +label: Staff +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: + relationship: none + view_mode: default + 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: + staff: staff + 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: Staff + 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: staff + menu: + type: normal + title: Staff + description: '' + expanded: false + parent: 'views_view:views.people.page_1' + weight: -50 + context: '0' + menu_name: main + 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/fahad/staff/staff.info.yml b/modules/fahad/staff/staff.info.yml new file mode 100644 index 0000000..f7c4cbf --- /dev/null +++ b/modules/fahad/staff/staff.info.yml @@ -0,0 +1,5 @@ +name: 'staff' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' diff --git a/modules/fahad/staff/staff.module b/modules/fahad/staff/staff.module new file mode 100644 index 0000000..82bf6bf --- /dev/null +++ b/modules/fahad/staff/staff.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains staff.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function staff_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the staff module. + case 'help.page.staff': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function staff_theme() { + return [ + 'staff' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/staff/templates/staff.html.twig b/modules/fahad/staff/templates/staff.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/staff/templates/staff.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/staff/tests/src/Functional/LoadTest.php b/modules/fahad/staff/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..5ad4fa3 --- /dev/null +++ b/modules/fahad/staff/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\staff\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group staff + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['staff']; + + /** + * 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/mansimran/academic_research/config/install/views.view.academic_research.yml b/modules/mansimran/academic_research/config/install/views.view.academic_research.yml new file mode 100644 index 0000000..7211825 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/views.view.academic_research.yml @@ -0,0 +1,223 @@ +langcode: en +status: true +dependencies: + config: + - node.type.academic_research_ + module: + - node + - user + enforced: + module: + - academic_research +id: academic_research +label: 'Academic Research' +module: views +description: 'Research activities in VIT' +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 + tags: + previous: ‹‹ + next: ›› + 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 + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + 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: + academic_research_: academic_research_ + 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: 'Academic Research' + header: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: false + tokenize: false + content: " VIT is a premier institute not only because of its excellent academic background but also because of its strong inclination towards research and development of innovative technologies.\r\n\r\nBeing placed 3rd among the top 30 research-oriented institutes speaks volumes about how VIT has managed to achieve a lot in a short span of time. Not only that but it has also secured sponsorship for 50 research projects and offers consultancy services worth more than Rs. 2.2 million.\r\nResearch Area" + plugin_id: text_custom + area_text_custom_1: + id: area_text_custom_1 + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: false + tokenize: false + content: " VIT is a premier institute not only because of its excellent academic background but also because of its strong inclination towards research and development of innovative technologies.\r\n\r\nBeing placed 3rd among the top 30 research-oriented institutes speaks volumes about how VIT has managed to achieve a lot in a short span of time. Not only that but it has also secured sponsorship for 50 research projects and offers consultancy services worth more than Rs. 2.2 million. " + plugin_id: text_custom + 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: academic-research + 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/mansimran/administrative_offices/administrative_offices.info.yml b/modules/mansimran/administrative_offices/administrative_offices.info.yml index 9a8f105..6ecbeec 100644 --- a/modules/mansimran/administrative_offices/administrative_offices.info.yml +++ b/modules/mansimran/administrative_offices/administrative_offices.info.yml @@ -3,3 +3,12 @@ type: module description: 'Administrative offices content type' core: 8.x package: 'Custom' +dependencies: + - drupal:paragraphs + - drupal:path + - drupal:text + - drupal:user + - drupal:entity_reference_revisions + - drupal:node + - drupal:menu_ui + diff --git a/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml b/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml index 9349875..22f494c 100644 --- a/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml +++ b/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml @@ -9,6 +9,9 @@ dependencies: - paragraphs - path - text + enforced: + module: + - administrative_offices id: node.administrative_offices.default targetEntityType: node bundle: administrative_offices diff --git a/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml b/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml index a173ed4..06c2b9a 100644 --- a/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml +++ b/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml @@ -1,7 +1,10 @@ uuid: af03fad4-b366-424d-bd9e-71b303a68ff3 langcode: en status: true -dependencies: { } +dependencies: + enforced: + module: + - administrative_offices id: office_details label: 'Office details' icon_uuid: null diff --git a/modules/mansimran/administrative_offices/config/install/views.view.administrative_offices.yml b/modules/mansimran/administrative_offices/config/install/views.view.administrative_offices.yml new file mode 100644 index 0000000..ccf1804 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/views.view.administrative_offices.yml @@ -0,0 +1,301 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.administrative_offices + module: + - node + - text + - user + enforced: + module: + - administrative_offices +id: administrative_offices +label: 'Administrative Offices' +module: views +description: 'List of administrative offices in VIT' +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: 5 + 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: grid + options: + grouping: { } + columns: 3 + automatic_width: true + alignment: horizontal + col_class_default: true + col_class_custom: '' + row_class_default: true + row_class_custom: '' + row: + type: fields + options: + inline: { } + separator: '' + hide_empty: false + default_field_elements: true + fields: + title: + id: title + table: node_field_data + field: title + 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: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: h2 + 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: string + settings: + link_to_entity: true + 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 + entity_type: node + entity_field: title + 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: 200 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: true + 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: + administrative_offices: administrative_offices + 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: 'Administrative Offices' + header: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: false + tokenize: false + content: ' VIT was establishded with the aim of providing quality higher education, on par with international standards. It persistently seeks and adopts innovative methods to improve the quality of higher education on a consistent basis. The campus has a cosmopolitan atmosphere with students from all corners of the globe. Experienced and learned teachers are strongly encouraged to nurture the students into well-rounded individuals. The global standards set at VIT in the field of teaching and research spurs us on in our relentless pursuit of excellence. In fact, it has become our way of life. The highly motivated youngsters on the campus are our constant source of pride. Our Memoranda of Understanding with various international universities are our major strength. They provide for an exchange of students and faculty and encourage joint research projects for the mutual benefit of the universities. Many of our students who pursue their research projects in foreign universities have done us proud by bringing quality work and esteem to India. With steady steps, we continue our march forward. We look forward to meeting you here at VIT. ' + plugin_id: text_custom + 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.body' + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: offices + 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.body' + diff --git a/modules/mansimran/chapters/chapters.install b/modules/mansimran/chapters/chapters.install new file mode 100644 index 0000000..ed00b15 --- /dev/null +++ b/modules/mansimran/chapters/chapters.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function chapters_uninstall() { + // 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', 'student_chapter'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/chapters/config/install/views.view.student_chapters.yml b/modules/mansimran/chapters/config/install/views.view.student_chapters.yml new file mode 100644 index 0000000..bb9263f --- /dev/null +++ b/modules/mansimran/chapters/config/install/views.view.student_chapters.yml @@ -0,0 +1,195 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.student_chapter + module: + - node + - user + enforced: + module: + - chapters +id: student_chapters +label: 'Student Chapters' +module: views +description: 'List of various Student chapters in VIT' +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: 5 + 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: + student_chapter: student_chapter + 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: 'Student Chapters' + 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: student-chapters + 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/mansimran/fest/config/install/views.view.fests.yml b/modules/mansimran/fest/config/install/views.view.fests.yml new file mode 100644 index 0000000..7501888 --- /dev/null +++ b/modules/mansimran/fest/config/install/views.view.fests.yml @@ -0,0 +1,195 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.fest + module: + - node + - user + enforced: + module: + - fest +id: fests +label: Fests +module: views +description: 'Fests in VIT' +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: 5 + 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: + fest: fest + 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: Fests + 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: fests + 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/mansimran/fest/fest.install b/modules/mansimran/fest/fest.install new file mode 100644 index 0000000..789d440 --- /dev/null +++ b/modules/mansimran/fest/fest.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function fest_uninstall() { + // 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', 'fest'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/international_transfer_program/config/install/views.view.itp.yml b/modules/mansimran/international_transfer_program/config/install/views.view.itp.yml new file mode 100644 index 0000000..baf41c9 --- /dev/null +++ b/modules/mansimran/international_transfer_program/config/install/views.view.itp.yml @@ -0,0 +1,201 @@ +langcode: en +status: true +dependencies: + config: + - node.type.international_transfer_program + module: + - node + - user + enforced: + module: + - international_transfer_program +id: itp +label: ITP +module: views +description: 'List of various ITPs ' +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: 5 + offset: 0 + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + 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 + 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: + international_transfer_program: international_transfer_program + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + granularity: second + entity_type: node + entity_field: created + plugin_id: date + title: 'International Transfer Program' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } + 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: { } + diff --git a/modules/mansimran/programs/config/install/views.view.programs_offered.yml b/modules/mansimran/programs/config/install/views.view.programs_offered.yml new file mode 100644 index 0000000..8c602c7 --- /dev/null +++ b/modules/mansimran/programs/config/install/views.view.programs_offered.yml @@ -0,0 +1,195 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.programs_offered + module: + - node + - user + enforced: + module: + - programs +id: programs_offered +label: 'programs offered' +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: 5 + 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: + programs_offered: programs_offered + 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: 'programs offered' + 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: programs-offered + 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/mansimran/programs/programs.install b/modules/mansimran/programs/programs.install new file mode 100644 index 0000000..f55b1da --- /dev/null +++ b/modules/mansimran/programs/programs.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function programs_uninstall() { + // 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', 'programs_offered'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/research_centers/config/install/views.view.research_center.yml b/modules/mansimran/research_centers/config/install/views.view.research_center.yml new file mode 100644 index 0000000..772e5a4 --- /dev/null +++ b/modules/mansimran/research_centers/config/install/views.view.research_center.yml @@ -0,0 +1,217 @@ +langcode: en +status: true +dependencies: + config: + - node.type.research_centers + module: + - node + - user + enforced: + module: + - research_centers +id: research_center +label: 'Research Center' +module: views +description: 'Research centers in VIT' +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: 13 + offset: 0 + id: 0 + total_pages: null + tags: + previous: ‹‹ + next: ›› + 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 + style: + type: grid + options: + grouping: { } + columns: 2 + automatic_width: true + alignment: horizontal + col_class_default: true + col_class_custom: '' + row_class_default: true + row_class_custom: '' + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + 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: + research_centers: research_centers + 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: 'Research Center' + header: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: false + tokenize: false + content: "VIT has always been a research –oriented and innovation driven university. This stems from VIT’s firm belief in creative thinking. Henceforth, Research Centres are also made a part of schools to give an opportunity to students to participate in exciting research projects. Automotive research, Crystal Research, Survey Research centre are some of the integral research centres here. \r\n\r\n\r\n\r\n" + plugin_id: text_custom + 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: research-center + 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/mansimran/research_centers/research_centers.install b/modules/mansimran/research_centers/research_centers.install new file mode 100644 index 0000000..2500031 --- /dev/null +++ b/modules/mansimran/research_centers/research_centers.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function research_centers_uninstall() { + // 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', 'research_centers'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/sae_teams/config/install/views.view.sae_teams.yml b/modules/mansimran/sae_teams/config/install/views.view.sae_teams.yml new file mode 100644 index 0000000..6feb0f5 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/views.view.sae_teams.yml @@ -0,0 +1,210 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.sae_teams_ + module: + - ds + - node + - user + enforced: + module: + - sae_teams +id: sae_teams +label: 'sae teams' +module: views +description: 'Description about SAE teams' +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: 4 + 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: 'ds_entity:node' + options: + relationship: none + view_mode: teaser + alternating_fieldset: + alternating: false + allpages: false + item_0: teaser + item_1: teaser + item_2: teaser + item_3: teaser + grouping_fieldset: + group: false + group_field: node_field_data|created + group_field_function: '' + advanced_fieldset: + advanced: false + 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: + sae_teams_: sae_teams_ + 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: 'SAE Teams' + 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: sae-teams + 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/mansimran/startups/config/install/views.view.startups.yml b/modules/mansimran/startups/config/install/views.view.startups.yml new file mode 100644 index 0000000..3df5d09 --- /dev/null +++ b/modules/mansimran/startups/config/install/views.view.startups.yml @@ -0,0 +1,196 @@ +uuid: 35e7242a-aed9-495b-b436-157bf7fa26ca +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.startups + module: + - node + - user + enforced: + module: + - startups +id: startups +label: startups +module: views +description: 'Various startups of vit' +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: 5 + 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: + startups: startups + 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: startups + 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: startups + 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/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml b/modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml index 09e0c21..d516c01 100644 --- a/modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml +++ b/modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml @@ -58,4 +58,4 @@ destination: bundle: club_and_chapter migration_dependencies: required: { } - optional: { }
\ No newline at end of file + optional: { } diff --git a/modules/mansimran/student_clubs/config/install/views.view.student_clubs.yml b/modules/mansimran/student_clubs/config/install/views.view.student_clubs.yml new file mode 100644 index 0000000..0620368 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/views.view.student_clubs.yml @@ -0,0 +1,331 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_logo_of_organisation + - field.storage.node.field_organisation_category + - node.type.club_and_chapter + module: + - image + - node + - user + enforced: + module: + - student_clubs +id: student_clubs +label: 'Student Clubs' +module: views +description: 'Various Student Clubs of VIT' +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: 5 + 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: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + 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 + field_organisation_category: + id: field_organisation_category + table: node__field_organisation_category + field: field_organisation_category + 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: entity_reference_label + settings: + link: true + group_column: target_id + 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 + field_logo_of_organisation: + id: field_logo_of_organisation + table: node__field_logo_of_organisation + field: field_logo_of_organisation + 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: '' + 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 + 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: + club_and_chapter: club_and_chapter + 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: 'Student Clubs' + 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_logo_of_organisation' + - 'config:field.storage.node.field_organisation_category' + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: student-clubs + 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_logo_of_organisation' + - 'config:field.storage.node.field_organisation_category' + diff --git a/modules/mansimran/student_clubs/student_clubs.install b/modules/mansimran/student_clubs/student_clubs.install new file mode 100644 index 0000000..46d2066 --- /dev/null +++ b/modules/mansimran/student_clubs/student_clubs.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function student_clubs_uninstall() { + // 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', 'club_and_chapter'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/testimonials/config/install/views.view.student_testimonials.yml b/modules/mansimran/testimonials/config/install/views.view.student_testimonials.yml new file mode 100644 index 0000000..31f81de --- /dev/null +++ b/modules/mansimran/testimonials/config/install/views.view.student_testimonials.yml @@ -0,0 +1,196 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.testimonials + module: + - node + - user + enforced: + module: + - testimonials +id: student_testimonials +label: 'Student Testimonials' +module: views +description: 'Student Testimonials' +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: 5 + 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: + testimonials: testimonials + 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: 'Student Testimonials' + 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: student-testimonials + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + |