summaryrefslogtreecommitdiff
path: root/modules/mansimran/academic_research
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mansimran/academic_research')
-rw-r--r--modules/mansimran/academic_research/academic_research.info.yml14
-rw-r--r--modules/mansimran/academic_research/academic_research.install27
-rw-r--r--modules/mansimran/academic_research/academic_research.module35
-rw-r--r--modules/mansimran/academic_research/composer.json14
-rw-r--r--modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml108
-rw-r--r--modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml51
-rw-r--r--modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml33
-rw-r--r--modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml24
-rw-r--r--modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml42
-rw-r--r--modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml31
-rw-r--r--modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml24
-rw-r--r--modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml23
-rw-r--r--modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml61
-rw-r--r--modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml48
-rw-r--r--modules/mansimran/academic_research/config/install/node.type.academic_research_.yml20
-rw-r--r--modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml12
-rw-r--r--modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml12
-rw-r--r--modules/mansimran/academic_research/templates/academic-research.html.twig1
-rw-r--r--modules/mansimran/academic_research/tests/src/Functional/LoadTest.php46
19 files changed, 626 insertions, 0 deletions
diff --git a/modules/mansimran/academic_research/academic_research.info.yml b/modules/mansimran/academic_research/academic_research.info.yml
new file mode 100644
index 0000000..da21bbc
--- /dev/null
+++ b/modules/mansimran/academic_research/academic_research.info.yml
@@ -0,0 +1,14 @@
+name: 'academic research'
+type: module
+description: 'academic research content type'
+core: 8.x
+package: 'Custom'
+dependencies:
+ - drupal:node
+ - drupal:text
+ - drupal:user
+ - drupal:menu_ui
+ - drupal:taxonomy
+ - drupal:path
+ - drupal:entity_reference_revisions
+ - drupal:paragraphs \ No newline at end of file
diff --git a/modules/mansimran/academic_research/academic_research.install b/modules/mansimran/academic_research/academic_research.install
new file mode 100644
index 0000000..af9eeb5
--- /dev/null
+++ b/modules/mansimran/academic_research/academic_research.install
@@ -0,0 +1,27 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function academic_research_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', 'academic_research_');
+ $nids = $query->execute();
+
+
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}
+
diff --git a/modules/mansimran/academic_research/academic_research.module b/modules/mansimran/academic_research/academic_research.module
new file mode 100644
index 0000000..9ab122c
--- /dev/null
+++ b/modules/mansimran/academic_research/academic_research.module
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains academic_research.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function academic_research_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ // Main module help for the academic_research module.
+ case 'help.page.academic_research':
+ $output = '';
+ $output .= '<h3>' . t('About') . '</h3>';
+ $output .= '<p>' . t('academic research content type') . '</p>';
+ return $output;
+
+ default:
+ }
+}
+
+/**
+ * Implements hook_theme().
+ */
+function academic_research_theme() {
+ return [
+ 'academic_research' => [
+ 'render element' => 'children',
+ ],
+ ];
+}
diff --git a/modules/mansimran/academic_research/composer.json b/modules/mansimran/academic_research/composer.json
new file mode 100644
index 0000000..bc72237
--- /dev/null
+++ b/modules/mansimran/academic_research/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "drupal/academic_research",
+ "type": "drupal-module",
+ "description": "academic research content type",
+ "keywords": ["Drupal"],
+ "license": "GPL-2.0+",
+ "homepage": "https://www.drupal.org/project/academic_research",
+ "minimum-stability": "dev",
+ "support": {
+ "issues": "https://www.drupal.org/project/issues/academic_research",
+ "source": "http://cgit.drupalcode.org/academic_research"
+ },
+ "require": { }
+}
diff --git a/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml b/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml
new file mode 100644
index 0000000..7279a61
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml
@@ -0,0 +1,108 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.academic_research_.body
+ - field.field.node.academic_research_.field_lab_facilities
+ - field.field.node.academic_research_.field_school
+ - node.type.academic_research_
+ module:
+ - paragraphs
+ - path
+ - text
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.default
+targetEntityType: node
+bundle: academic_research_
+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_lab_facilities:
+ 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
+ field_school:
+ weight: 122
+ 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/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml
new file mode 100644
index 0000000..f87f926
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml
@@ -0,0 +1,51 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.academic_research_.body
+ - field.field.node.academic_research_.field_lab_facilities
+ - field.field.node.academic_research_.field_school
+ - node.type.academic_research_
+ module:
+ - entity_reference_revisions
+ - text
+ - user
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.default
+targetEntityType: node
+bundle: academic_research_
+mode: default
+content:
+ body:
+ label: hidden
+ type: text_default
+ weight: 101
+ settings: { }
+ third_party_settings: { }
+ region: content
+ field_lab_facilities:
+ type: entity_reference_revisions_entity_view
+ weight: 103
+ label: hidden
+ settings:
+ view_mode: default
+ link: ''
+ third_party_settings: { }
+ region: content
+ field_school:
+ weight: 102
+ label: above
+ 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/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml
new file mode 100644
index 0000000..b99ccb4
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml
@@ -0,0 +1,33 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - core.entity_view_mode.node.teaser
+ - field.field.node.academic_research_.body
+ - node.type.academic_research_
+ module:
+ - text
+ - user
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.teaser
+targetEntityType: node
+bundle: academic_research_
+mode: teaser
+content:
+ body:
+ label: hidden
+ type: text_summary_or_trimmed
+ weight: 100
+ settings:
+ trim_length: 600
+ third_party_settings: { }
+ region: content
+ links:
+ weight: 101
+ region: content
+ settings: { }
+ third_party_settings: { }
+hidden:
+ langcode: true
diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml
new file mode 100644
index 0000000..c750848
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml
@@ -0,0 +1,24 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.body
+ - node.type.academic_research_
+ module:
+ - text
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.body
+field_name: body
+entity_type: node
+bundle: academic_research_
+label: Body
+description: 'Some Description '
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ display_summary: true
+field_type: text_with_summary
diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml
new file mode 100644
index 0000000..684315b
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml
@@ -0,0 +1,42 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_lab_facilities
+ - node.type.academic_research_
+ - paragraphs.paragraphs_type.lab_facilities
+ module:
+ - entity_reference_revisions
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.field_lab_facilities
+field_name: field_lab_facilities
+entity_type: node
+bundle: academic_research_
+label: 'Lab Facilities'
+description: 'Lab facilities of VIT '
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:paragraph'
+ handler_settings:
+ negate: 0
+ target_bundles:
+ lab_facilities: lab_facilities
+ target_bundles_drag_drop:
+ lab_facilities:
+ enabled: true
+ weight: 5
+ member_details_field:
+ weight: 6
+ enabled: false
+ office_details:
+ weight: 7
+ enabled: false
+ r_d_projects:
+ weight: 8
+ enabled: false
+field_type: entity_reference_revisions
diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml
new file mode 100644
index 0000000..e0db681
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml
@@ -0,0 +1,31 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_school
+ - node.type.academic_research_
+ - taxonomy.vocabulary.school_s_of_vit_
+ enforced:
+ module:
+ - academic_research
+id: node.academic_research_.field_school
+field_name: field_school
+entity_type: node
+bundle: academic_research_
+label: school
+description: 'School carrying the research'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ school_s_of_vit_: school_s_of_vit_
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml b/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml
new file mode 100644
index 0000000..e95b22c
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml
@@ -0,0 +1,24 @@
+uuid: bd9a44a5-9301-4af6-9ac4-6e636ae16e0c
+langcode: en
+status: true
+dependencies:
+ module:
+ - entity_reference_revisions
+ - node
+ - paragraphs
+ enforced:
+ module:
+ - academic_research
+id: node.field_lab_facilities
+field_name: field_lab_facilities
+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/mansimran/academic_research/config/install/field.storage.node.field_school.yml b/modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml
new file mode 100644
index 0000000..73cccc0
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml
@@ -0,0 +1,23 @@
+uuid: 711659e0-ad09-4fac-9943-1efee9f2db4f
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - taxonomy
+ enforced:
+ module:
+ - academic_research
+id: node.field_school
+field_name: field_school
+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/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml
new file mode 100644
index 0000000..378d87d
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml
@@ -0,0 +1,61 @@
+langcode: en
+status: true
+id: acad_node_migration
+class: null
+field_plugin_method: null
+cck_plugin_method: null
+migration_tags:
+ - CSV
+migration_group: default
+label: 'acad content migration'
+source:
+ plugin: csv
+ path: /home/mansimran/Desktop/mansimran1/acad_node.csv
+ delimiter: ','
+ enclosure: '"'
+ header_row_count: 1
+ keys:
+ - id
+process:
+ type:
+ plugin: default_value
+ default_value: academic_research_
+ title: title
+ body/value: body
+ body/format:
+ plugin: default_value
+ default_value: basic_html
+ field_school:
+ plugin: entity_lookup
+ entity_type: taxonomy_term
+ bundle: school_s_of_vit_
+ source: school
+ field_lab_facilities/target_id:
+ -
+ plugin: migration_lookup
+ migration: acad_paragraph_migration
+ allow_multiple: true
+ source: id
+ no_stub: true
+ -
+ plugin: extract
+ index:
+ - 0
+ field_lab_facilities/target_revision_id:
+ -
+ plugin: migration_lookup
+ migration: acad_paragraph_migration
+ allow_multiple: true
+ source: id
+ no_stub: true
+ -
+ plugin: extract
+ index:
+ - 1
+destination:
+ plugin: 'entity:node'
+ bundle: academic_research_
+migration_dependencies:
+ required:
+ - acad_paragraph_migration
+ optional: { } \ No newline at end of file
diff --git a/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml
new file mode 100644
index 0000000..fffaa67
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml
@@ -0,0 +1,48 @@
+langcode: en
+status: true
+id: acad_paragraph_migration
+class: null
+field_plugin_method: null
+cck_plugin_method: null
+migration_tags:
+ - CSV
+migration_group: default
+label: 'acad content migration'
+source:
+ plugin: csv
+ path: /home/mansimran/Desktop/mansimran1/acad_para.csv
+ delimiter: ','
+ enclosure: '"'
+ header_row_count: 1
+ keys:
+ - id
+ constants:
+ file_source: /var/www/migrationdata/programs
+ file_dest: 'public://programs/'
+process:
+ type:
+ plugin: default_value
+ default_value: lab_facilities
+ source_path:
+ -
+ plugin: skip_on_empty
+ method: process
+ source: photos
+ -
+ plugin: concat
+ delimiter: /
+ source:
+ - constants/file_source
+ - photos
+ field_classrooms: classrooms
+ field_laboratories: laboratories
+ field_learning_ambience: ambience
+ field_photos:
+ plugin: file_import
+ source: '@source_path'
+ destination: constants/file_dest
+destination:
+ plugin: entity_reference_revisions:paragraph
+migration_dependencies:
+ required: { }
+ optional: { } \ No newline at end of file
diff --git a/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml b/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml
new file mode 100644
index 0000000..32efada
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - menu_ui
+ enforced:
+ module:
+ - academic_research
+third_party_settings:
+ menu_ui:
+ available_menus:
+ - main
+ parent: 'main:'
+name: 'Academic Research'
+type: academic_research_
+description: 'this page will talk about the research activities in vit'
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: false
diff --git a/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml b/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml
new file mode 100644
index 0000000..ec2e6b8
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml
@@ -0,0 +1,12 @@
+uuid: 436a9a77-4fed-4085-b474-3da0a8a78e1f
+langcode: en
+status: true
+dependencies:
+ enforced:
+ module:
+ - academic_research
+id: lab_facilities
+label: 'Lab Facilities'
+icon_uuid: null
+description: ''
+behavior_plugins: { }
diff --git a/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml b/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml
new file mode 100644
index 0000000..60fc7fd
--- /dev/null
+++ b/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml
@@ -0,0 +1,12 @@
+uuid: 30a88923-bcef-4a81-8cb9-a80941356747
+langcode: en
+status: true
+dependencies:
+ enforced:
+ module:
+ - academic_research
+name: 'SCHOOL''s of vit'
+vid: school_s_of_vit_
+description: 'Various academic schools in vit'
+hierarchy: 0
+weight: 0
diff --git a/modules/mansimran/academic_research/templates/academic-research.html.twig b/modules/mansimran/academic_research/templates/academic-research.html.twig
new file mode 100644
index 0000000..91e43c8
--- /dev/null
+++ b/modules/mansimran/academic_research/templates/academic-research.html.twig
@@ -0,0 +1 @@
+<!-- Add you custom twig html here --> \ No newline at end of file
diff --git a/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php b/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..871ad96
--- /dev/null
+++ b/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\academic_research\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group academic_research
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['academic_research'];
+
+ /**
+ * 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);
+ }
+
+}