summaryrefslogtreecommitdiff
path: root/modules/kalpesh/laboratory
diff options
context:
space:
mode:
authorNitesh Kumar Sinha2019-07-03 17:43:33 +0530
committerGitHub2019-07-03 17:43:33 +0530
commit779f770a2022c3792d5e2dae95e0381093fb8989 (patch)
treeabdd8c069b9f40dcbf5896f3532e9b6d0df3186b /modules/kalpesh/laboratory
parentb7d155a06ae52fcee0b66123b6ea36556336ea18 (diff)
parentf71a4f5fe7d1f3536e85759740d7779825f9c306 (diff)
downloadacadmix_distribution-779f770a2022c3792d5e2dae95e0381093fb8989.tar.gz
acadmix_distribution-779f770a2022c3792d5e2dae95e0381093fb8989.tar.bz2
acadmix_distribution-779f770a2022c3792d5e2dae95e0381093fb8989.zip
Merge pull request #20 from oskkw/master
kalpesh custom module added
Diffstat (limited to 'modules/kalpesh/laboratory')
-rw-r--r--modules/kalpesh/laboratory/composer.json13
-rw-r--r--modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.promote.yml.yml21
-rw-r--r--modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.title.yml.yml17
-rw-r--r--modules/kalpesh/laboratory/config/install/core.entity_form_display.node.laboratories.default.yml119
-rw-r--r--modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.default.yml199
-rw-r--r--modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.teaser.yml30
-rw-r--r--modules/kalpesh/laboratory/config/install/core.entity_view_mode.node.teaser.yml9
-rw-r--r--modules/kalpesh/laboratory/config/install/field.field.node.laboratories.body.yml21
-rw-r--r--modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_area.yml18
-rw-r--r--modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_equipment_cost.yml18
-rw-r--r--modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_image.yml37
-rw-r--r--modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_utilisation_of_lab.yml20
-rw-r--r--modules/kalpesh/laboratory/config/install/field.storage.node.body.yml18
-rw-r--r--modules/kalpesh/laboratory/config/install/field.storage.node.field_area.yml20
-rw-r--r--modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_equipment_cost.yml20
-rw-r--r--modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_image.yml29
-rw-r--r--modules/kalpesh/laboratory/config/install/field.storage.node.field_utilisation_of_lab.yml18
-rw-r--r--modules/kalpesh/laboratory/config/install/image.style.thumbnail.yml14
-rw-r--r--modules/kalpesh/laboratory/config/install/node.type.laboratories.yml17
-rw-r--r--modules/kalpesh/laboratory/config/install/views.view.laboratories.yml332
-rw-r--r--modules/kalpesh/laboratory/laboratory.info.yml14
-rw-r--r--modules/kalpesh/laboratory/laboratory.install64
-rw-r--r--modules/kalpesh/laboratory/laboratory.module35
-rw-r--r--modules/kalpesh/laboratory/templates/laboratory.html.twig1
-rw-r--r--modules/kalpesh/laboratory/tests/src/Functional/LoadTest.php46
25 files changed, 1150 insertions, 0 deletions
diff --git a/modules/kalpesh/laboratory/composer.json b/modules/kalpesh/laboratory/composer.json
new file mode 100644
index 0000000..59103d2
--- /dev/null
+++ b/modules/kalpesh/laboratory/composer.json
@@ -0,0 +1,13 @@
+{
+ "name": "laboratory",
+ "type": "drupal-module",
+ "description": "This module store laboratories details",
+ "keywords": [
+ ],
+ "homepage": "https://www.drupal.org/project/laboratory",
+ "minimum-stability": "dev",
+ "support": {
+ "issues": "https://www.drupal.org/project/issues/laboratory",
+ "source": "http://cgit.drupalcode.org/laboratory",
+ },
+}
diff --git a/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.promote.yml.yml b/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.promote.yml.yml
new file mode 100644
index 0000000..4f19a9c
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.promote.yml.yml
@@ -0,0 +1,21 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - node.type.laboratories
+id: node.laboratories.promote
+field_name: promote
+entity_type: node
+bundle: laboratories
+label: 'Promoted to front page'
+description: ''
+required: false
+translatable: true
+default_value:
+ -
+ value: 0
+default_value_callback: ''
+settings:
+ on_label: 'On'
+ off_label: 'Off'
+field_type: boolean
diff --git a/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.title.yml.yml b/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.title.yml.yml
new file mode 100644
index 0000000..f330136
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.base_field_override.node.laboratories.title.yml.yml
@@ -0,0 +1,17 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - node.type.laboratories
+id: node.laboratories.title
+field_name: title
+entity_type: node
+bundle: laboratories
+label: Laboratory
+description: ''
+required: true
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: string
diff --git a/modules/kalpesh/laboratory/config/install/core.entity_form_display.node.laboratories.default.yml b/modules/kalpesh/laboratory/config/install/core.entity_form_display.node.laboratories.default.yml
new file mode 100644
index 0000000..4fbebd3
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.entity_form_display.node.laboratories.default.yml
@@ -0,0 +1,119 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.laboratories.body
+ - field.field.node.laboratories.field_area
+ - field.field.node.laboratories.field_lab_equipment_cost
+ - field.field.node.laboratories.field_lab_image
+ - field.field.node.laboratories.field_utilisation_of_lab
+ - image.style.thumbnail
+ - node.type.laboratories
+ module:
+ - image
+ - path
+ - text
+id: node.laboratories.default
+targetEntityType: node
+bundle: laboratories
+mode: default
+content:
+ body:
+ type: text_textarea_with_summary
+ weight: 11
+ settings:
+ rows: 9
+ summary_rows: 3
+ placeholder: ''
+ third_party_settings: { }
+ region: content
+ created:
+ type: datetime_timestamp
+ weight: 6
+ region: content
+ settings: { }
+ third_party_settings: { }
+ field_area:
+ weight: 1
+ settings:
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ type: string_textfield
+ region: content
+ field_lab_equipment_cost:
+ weight: 2
+ settings:
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ type: string_textfield
+ region: content
+ field_lab_image:
+ weight: 13
+ settings:
+ progress_indicator: throbber
+ preview_image_style: thumbnail
+ third_party_settings: { }
+ type: image_image
+ region: content
+ field_utilisation_of_lab:
+ weight: 3
+ settings:
+ rows: 5
+ placeholder: ''
+ third_party_settings: { }
+ type: text_textarea
+ region: content
+ langcode:
+ type: language_select
+ weight: 4
+ region: content
+ settings:
+ include_locked: true
+ third_party_settings: { }
+ path:
+ type: path
+ weight: 9
+ region: content
+ settings: { }
+ third_party_settings: { }
+ promote:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 7
+ region: content
+ third_party_settings: { }
+ status:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 10
+ region: content
+ third_party_settings: { }
+ sticky:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 8
+ 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: 5
+ settings:
+ match_operator: CONTAINS
+ size: 60
+ placeholder: ''
+ region: content
+ third_party_settings: { }
+hidden: { }
diff --git a/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.default.yml b/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.default.yml
new file mode 100644
index 0000000..46a115d
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.default.yml
@@ -0,0 +1,199 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.laboratories.body
+ - field.field.node.laboratories.field_area
+ - field.field.node.laboratories.field_lab_equipment_cost
+ - field.field.node.laboratories.field_lab_image
+ - field.field.node.laboratories.field_utilisation_of_lab
+ - node.type.laboratories
+ module:
+ - ds
+ - image
+ - text
+ - user
+third_party_settings:
+ ds:
+ layout:
+ id: ds_1col
+ library: null
+ disable_css: false
+ entity_classes: all_classes
+ settings:
+ wrappers:
+ ds_content: div
+ outer_wrapper: div
+ attributes: ''
+ link_attribute: ''
+ link_custom: ''
+ classes:
+ layout_class: { }
+ ds_content: { }
+ regions:
+ ds_content:
+ - node_title
+ - field_lab_image
+ - field_area
+ - field_lab_equipment_cost
+ - field_utilisation_of_lab
+ fields:
+ node_title:
+ plugin_id: node_title
+ weight: 0
+ label: hidden
+ formatter: default
+id: node.laboratories.default
+targetEntityType: node
+bundle: laboratories
+mode: default
+content:
+ field_area:
+ type: string
+ weight: 2
+ region: ds_content
+ label: above
+ settings:
+ link_to_entity: false
+ third_party_settings:
+ ds:
+ ft:
+ id: expert
+ settings:
+ lb: 'Area '
+ prefix: ''
+ lbw: true
+ lbw-el: div
+ lbw-cl: 'fw-bold col-sm-3'
+ lbw-at: ''
+ ow: true
+ ow-el: div
+ ow-cl: 'row '
+ ow-at: ''
+ fis-el: ''
+ fis-cl: ''
+ fis-at: ''
+ fi: true
+ fi-el: div
+ fi-cl: col-sm-5
+ fi-at: ''
+ suffix: ''
+ lb-col: false
+ ow-def-at: false
+ ow-def-cl: false
+ fis: false
+ fis-def-at: false
+ fi-def-at: false
+ field_lab_equipment_cost:
+ type: string
+ weight: 3
+ region: ds_content
+ label: above
+ settings:
+ link_to_entity: false
+ third_party_settings:
+ ds:
+ ft:
+ id: expert
+ settings:
+ lb: 'Equipment cost'
+ prefix: ''
+ lbw: true
+ lbw-el: div
+ lbw-cl: 'col-sm-3 fw-bold'
+ lbw-at: ''
+ ow: true
+ ow-el: div
+ ow-cl: 'row mb-10'
+ ow-at: ''
+ fis-el: ''
+ fis-cl: ''
+ fis-at: ''
+ fi: true
+ fi-el: div
+ fi-cl: col-sm-5
+ fi-at: ''
+ suffix: ''
+ lb-col: false
+ ow-def-at: false
+ ow-def-cl: false
+ fis: false
+ fis-def-at: false
+ fi-def-at: false
+ field_lab_image:
+ type: image
+ weight: 1
+ region: ds_content
+ label: hidden
+ settings:
+ image_style: ''
+ image_link: ''
+ third_party_settings:
+ ds:
+ ds_limit: ''
+ ft:
+ id: expert
+ settings:
+ lb: ''
+ prefix: ''
+ lbw: true
+ lbw-el: 'div '
+ lbw-cl: ' fw-bold '
+ lbw-at: ''
+ ow: true
+ ow-el: div
+ ow-cl: 'center-block mt-10 mb-10'
+ ow-at: ''
+ fis-el: ''
+ fis-cl: ''
+ fis-at: ''
+ fi: true
+ fi-el: 'div '
+ fi-cl: ' center-block'
+ fi-at: ''
+ suffix: ''
+ lb-col: false
+ ow-def-at: false
+ ow-def-cl: false
+ fis: false
+ fis-def-at: false
+ fi-def-at: false
+ field_utilisation_of_lab:
+ type: text_default
+ weight: 4
+ region: ds_content
+ label: above
+ settings: { }
+ third_party_settings:
+ ds:
+ ft:
+ id: expert
+ settings:
+ lb: Utilisation
+ prefix: ''
+ lbw: true
+ lbw-el: div
+ lbw-cl: 'col-sm-3 fw-bold '
+ lbw-at: ''
+ ow: true
+ ow-el: div
+ ow-cl: 'row mb-10'
+ ow-at: ''
+ fis-el: ''
+ fis-cl: ''
+ fis-at: ''
+ fi: true
+ fi-el: div
+ fi-cl: col-sm-5
+ fi-at: ''
+ suffix: ''
+ lb-col: false
+ ow-def-at: false
+ ow-def-cl: false
+ fis: false
+ fis-def-at: false
+ fi-def-at: false
+hidden:
+ body: true
+ langcode: true
+ links: true
diff --git a/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.teaser.yml b/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.teaser.yml
new file mode 100644
index 0000000..fc8a10f
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.entity_view_display.node.laboratories.teaser.yml
@@ -0,0 +1,30 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - core.entity_view_mode.node.teaser
+ - field.field.node.laboratories.body
+ - node.type.laboratories
+ module:
+ - text
+ - user
+id: node.laboratories.teaser
+targetEntityType: node
+bundle: laboratories
+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/kalpesh/laboratory/config/install/core.entity_view_mode.node.teaser.yml b/modules/kalpesh/laboratory/config/install/core.entity_view_mode.node.teaser.yml
new file mode 100644
index 0000000..dcde72c
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/core.entity_view_mode.node.teaser.yml
@@ -0,0 +1,9 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+id: node.teaser
+label: Teaser
+targetEntityType: node
+cache: true
diff --git a/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.body.yml b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.body.yml
new file mode 100644
index 0000000..abf6034
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.body.yml
@@ -0,0 +1,21 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.body
+ - node.type.laboratories
+ module:
+ - text
+id: node.laboratories.body
+field_name: body
+entity_type: node
+bundle: laboratories
+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/kalpesh/laboratory/config/install/field.field.node.laboratories.field_area.yml b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_area.yml
new file mode 100644
index 0000000..5b99a65
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_area.yml
@@ -0,0 +1,18 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_area
+ - node.type.laboratories
+id: node.laboratories.field_area
+field_name: field_area
+entity_type: node
+bundle: laboratories
+label: Area
+description: 'Area of lab'
+required: true
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: string
diff --git a/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_equipment_cost.yml b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_equipment_cost.yml
new file mode 100644
index 0000000..781af14
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_equipment_cost.yml
@@ -0,0 +1,18 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_lab_equipment_cost
+ - node.type.laboratories
+id: node.laboratories.field_lab_equipment_cost
+field_name: field_lab_equipment_cost
+entity_type: node
+bundle: laboratories
+label: 'Lab Equipment cost'
+description: 'cost of software and machines'
+required: true
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: string
diff --git a/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_image.yml b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_image.yml
new file mode 100644
index 0000000..18b6487
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_lab_image.yml
@@ -0,0 +1,37 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_lab_image
+ - node.type.laboratories
+ module:
+ - image
+id: node.laboratories.field_lab_image
+field_name: field_lab_image
+entity_type: node
+bundle: laboratories
+label: 'Lab Image'
+description: ''
+required: true
+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/kalpesh/laboratory/config/install/field.field.node.laboratories.field_utilisation_of_lab.yml b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_utilisation_of_lab.yml
new file mode 100644
index 0000000..a9a8ec9
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.field.node.laboratories.field_utilisation_of_lab.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_utilisation_of_lab
+ - node.type.laboratories
+ module:
+ - text
+id: node.laboratories.field_utilisation_of_lab
+field_name: field_utilisation_of_lab
+entity_type: node
+bundle: laboratories
+label: 'Utilisation of lab'
+description: 'Semiser wise use of lab in hours/week'
+required: true
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: text_long
diff --git a/modules/kalpesh/laboratory/config/install/field.storage.node.body.yml b/modules/kalpesh/laboratory/config/install/field.storage.node.body.yml
new file mode 100644
index 0000000..73edd16
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.storage.node.body.yml
@@ -0,0 +1,18 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - text
+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/kalpesh/laboratory/config/install/field.storage.node.field_area.yml b/modules/kalpesh/laboratory/config/install/field.storage.node.field_area.yml
new file mode 100644
index 0000000..84078c4
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.storage.node.field_area.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+id: node.field_area
+field_name: field_area
+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/kalpesh/laboratory/config/install/field.storage.node.field_lab_equipment_cost.yml b/modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_equipment_cost.yml
new file mode 100644
index 0000000..11fd9d4
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_equipment_cost.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+id: node.field_lab_equipment_cost
+field_name: field_lab_equipment_cost
+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/kalpesh/laboratory/config/install/field.storage.node.field_lab_image.yml b/modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_image.yml
new file mode 100644
index 0000000..0f442a3
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.storage.node.field_lab_image.yml
@@ -0,0 +1,29 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - file
+ - image
+ - node
+id: node.field_lab_image
+field_name: field_lab_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/kalpesh/laboratory/config/install/field.storage.node.field_utilisation_of_lab.yml b/modules/kalpesh/laboratory/config/install/field.storage.node.field_utilisation_of_lab.yml
new file mode 100644
index 0000000..b4b49b6
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/field.storage.node.field_utilisation_of_lab.yml
@@ -0,0 +1,18 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - text
+id: node.field_utilisation_of_lab
+field_name: field_utilisation_of_lab
+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/kalpesh/laboratory/config/install/image.style.thumbnail.yml b/modules/kalpesh/laboratory/config/install/image.style.thumbnail.yml
new file mode 100644
index 0000000..73dc9b8
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/image.style.thumbnail.yml
@@ -0,0 +1,14 @@
+langcode: en
+status: true
+dependencies: { }
+name: thumbnail
+label: 'Thumbnail (100×100)'
+effects:
+ 1cfec298-8620-4749-b100-ccb6c4500779:
+ uuid: 1cfec298-8620-4749-b100-ccb6c4500779
+ id: image_scale
+ weight: 0
+ data:
+ width: 100
+ height: 100
+ upscale: false
diff --git a/modules/kalpesh/laboratory/config/install/node.type.laboratories.yml b/modules/kalpesh/laboratory/config/install/node.type.laboratories.yml
new file mode 100644
index 0000000..893d977
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/node.type.laboratories.yml
@@ -0,0 +1,17 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - menu_ui
+third_party_settings:
+ menu_ui:
+ available_menus:
+ - main
+ parent: 'main:'
+name: Laboratories
+type: laboratories
+description: 'Detail information about laboratories'
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: true
diff --git a/modules/kalpesh/laboratory/config/install/views.view.laboratories.yml b/modules/kalpesh/laboratory/config/install/views.view.laboratories.yml
new file mode 100644
index 0000000..9c76627
--- /dev/null
+++ b/modules/kalpesh/laboratory/config/install/views.view.laboratories.yml
@@ -0,0 +1,332 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_lab_image
+ - image.style.acad_fac_thumbnail_400_300_
+ - node.type.laboratories
+ - system.menu.main
+ module:
+ - image
+ - node
+ - user
+id: laboratories
+label: laboratories
+module: views
+description: 'Details of lab'
+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: full
+ options:
+ items_per_page: 10
+ offset: 0
+ id: 0
+ total_pages: null
+ tags:
+ previous: ‹‹
+ next: ››
+ first: '« First'
+ last: 'Last »'
+ 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
+ quantity: 9
+ 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
+ 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: h3
+ 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
+ field_lab_image:
+ id: field_lab_image
+ table: node__field_lab_image
+ field: field_lab_image
+ 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: acad_fac_thumbnail_400_300_
+ 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
+ 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_1:
+ id: type_1
+ table: node_field_data
+ field: type
+ relationship: none
+ group_type: group
+ admin_label: ''
+ operator: in
+ value:
+ laboratories: laboratories
+ 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: { }
+ 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: laboratories
+ header: { }
+ footer: { }
+ empty: { }
+ relationships: { }
+ arguments: { }
+ display_extenders: { }
+ filter_groups:
+ operator: AND
+ groups:
+ 1: AND
+ 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_lab_image'
+ page_1:
+ display_plugin: page
+ id: page_1
+ display_title: Page
+ position: 1
+ display_options:
+ display_extenders: { }
+ path: laboratories
+ menu:
+ type: normal
+ title: laboratories
+ description: ''
+ expanded: false
+ parent: ''
+ weight: -48
+ 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:
+ - 'config:field.storage.node.field_lab_image'
diff --git a/modules/kalpesh/laboratory/laboratory.info.yml b/modules/kalpesh/laboratory/laboratory.info.yml
new file mode 100644
index 0000000..1db207c
--- /dev/null
+++ b/modules/kalpesh/laboratory/laboratory.info.yml
@@ -0,0 +1,14 @@
+name: laboratory
+type: module
+description: 'This module store laboratories details'
+core: 8.x
+package: Custom
+dependencies:
+ - drupal:menu_ui
+ - drupal:image
+ - drupal:path
+ - drupal:text
+ - ds:ds
+ - drupal:user
+ - drupal:node
+ - drupal:file
diff --git a/modules/kalpesh/laboratory/laboratory.install b/modules/kalpesh/laboratory/laboratory.install
new file mode 100644
index 0000000..68dfe55
--- /dev/null
+++ b/modules/kalpesh/laboratory/laboratory.install
@@ -0,0 +1,64 @@
+<?php
+
+
+/**
+
+
+* Implements hook_uninstall().
+
+
+*/
+
+
+function laboratory_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', 'laboratories');
+
+
+ $nids = $query->execute();
+
+
+
+
+
+
+
+ // Delete entities.
+
+
+ if (!empty($nids)) {
+
+
+ $entities = $nodeStorage->loadMultiple($nids);
+
+
+ $nodeStorage->delete($entities);
+
+
+ }
+
+
+}
+
diff --git a/modules/kalpesh/laboratory/laboratory.module b/modules/kalpesh/laboratory/laboratory.module
new file mode 100644
index 0000000..5a9801f
--- /dev/null
+++ b/modules/kalpesh/laboratory/laboratory.module
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains laboratory.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function laboratory_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ // Main module help for the laboratory module.
+ case 'help.page.laboratory':
+ $output = '';
+ $output .= '<h3>' . t('About') . '</h3>';
+ $output .= '<p>' . t('This module store laboratories details') . '</p>';
+ return $output;
+
+ default:
+ }
+}
+
+/**
+ * Implements hook_theme().
+ */
+function laboratory_theme() {
+ return [
+ 'laboratory' => [
+ 'render element' => 'children',
+ ],
+ ];
+}
diff --git a/modules/kalpesh/laboratory/templates/laboratory.html.twig b/modules/kalpesh/laboratory/templates/laboratory.html.twig
new file mode 100644
index 0000000..95722bd
--- /dev/null
+++ b/modules/kalpesh/laboratory/templates/laboratory.html.twig
@@ -0,0 +1 @@
+<!-- Add you custom twig html here -->
diff --git a/modules/kalpesh/laboratory/tests/src/Functional/LoadTest.php b/modules/kalpesh/laboratory/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..431de13
--- /dev/null
+++ b/modules/kalpesh/laboratory/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\laboratory\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group laboratory
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['laboratory'];
+
+ /**
+ * 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);
+ }
+
+}