summaryrefslogtreecommitdiff
path: root/modules/mansimran/international_transfer_program
diff options
context:
space:
mode:
authorMansimran72019-07-02 12:16:59 +0530
committerMansimran72019-07-02 12:16:59 +0530
commit4e585c030ed6b5ea73b77a696a78f8855d9a26d8 (patch)
treea9dd98d2648c35aa2357eb7bc473469f6cc8d417 /modules/mansimran/international_transfer_program
parent3ad1b8d590d7d11d83e8c923970690900dc31f70 (diff)
downloadacadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.gz
acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.bz2
acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.zip
pushing all custom modules
Diffstat (limited to 'modules/mansimran/international_transfer_program')
-rw-r--r--modules/mansimran/international_transfer_program/composer.json14
-rw-r--r--modules/mansimran/international_transfer_program/config/install/core.entity_form_display.node.international_transfer_program.default.yml104
-rw-r--r--modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.default.yml54
-rw-r--r--modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.teaser.yml37
-rw-r--r--modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.body.yml24
-rw-r--r--modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_country.yml31
-rw-r--r--modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_link_.yml25
-rw-r--r--modules/mansimran/international_transfer_program/config/install/field.storage.node.field_country.yml23
-rw-r--r--modules/mansimran/international_transfer_program/config/install/field.storage.node.field_link_.yml22
-rw-r--r--modules/mansimran/international_transfer_program/config/install/node.type.international_transfer_program.yml20
-rw-r--r--modules/mansimran/international_transfer_program/config/install/taxonomy.vocabulary.continent.yml12
-rw-r--r--modules/mansimran/international_transfer_program/international_transfer_program.info.yml13
-rw-r--r--modules/mansimran/international_transfer_program/international_transfer_program.install27
-rw-r--r--modules/mansimran/international_transfer_program/international_transfer_program.module35
-rw-r--r--modules/mansimran/international_transfer_program/international_transfer_program.routing.yml8
-rw-r--r--modules/mansimran/international_transfer_program/src/Controller/itpController.php25
-rw-r--r--modules/mansimran/international_transfer_program/templates/international-transfer-program.html.twig1
-rw-r--r--modules/mansimran/international_transfer_program/tests/src/Functional/LoadTest.php46
18 files changed, 521 insertions, 0 deletions
diff --git a/modules/mansimran/international_transfer_program/composer.json b/modules/mansimran/international_transfer_program/composer.json
new file mode 100644
index 0000000..f6d69e0
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "drupal/international_transfer_program",
+ "type": "drupal-module",
+ "description": "Importing itp content type",
+ "keywords": ["Drupal"],
+ "license": "GPL-2.0+",
+ "homepage": "https://www.drupal.org/project/international_transfer_program",
+ "minimum-stability": "dev",
+ "support": {
+ "issues": "https://www.drupal.org/project/issues/international_transfer_program",
+ "source": "http://cgit.drupalcode.org/international_transfer_program"
+ },
+ "require": { }
+}
diff --git a/modules/mansimran/international_transfer_program/config/install/core.entity_form_display.node.international_transfer_program.default.yml b/modules/mansimran/international_transfer_program/config/install/core.entity_form_display.node.international_transfer_program.default.yml
new file mode 100644
index 0000000..8b36945
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/core.entity_form_display.node.international_transfer_program.default.yml
@@ -0,0 +1,104 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.international_transfer_program.body
+ - field.field.node.international_transfer_program.field_country
+ - field.field.node.international_transfer_program.field_link_
+ - node.type.international_transfer_program
+ module:
+ - link
+ - path
+ - text
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.default
+targetEntityType: node
+bundle: international_transfer_program
+mode: default
+content:
+ body:
+ type: text_textarea_with_summary
+ weight: 122
+ 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_country:
+ weight: 121
+ settings:
+ match_operator: CONTAINS
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ type: entity_reference_autocomplete
+ region: content
+ field_link_:
+ 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/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.default.yml b/modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.default.yml
new file mode 100644
index 0000000..a562947
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.default.yml
@@ -0,0 +1,54 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.international_transfer_program.body
+ - field.field.node.international_transfer_program.field_country
+ - field.field.node.international_transfer_program.field_link_
+ - node.type.international_transfer_program
+ module:
+ - link
+ - text
+ - user
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.default
+targetEntityType: node
+bundle: international_transfer_program
+mode: default
+content:
+ body:
+ label: hidden
+ type: text_default
+ weight: 101
+ settings: { }
+ third_party_settings: { }
+ region: content
+ field_country:
+ weight: 103
+ label: above
+ settings:
+ link: true
+ third_party_settings: { }
+ type: entity_reference_label
+ region: content
+ field_link_:
+ weight: 102
+ label: above
+ settings:
+ trim_length: 80
+ url_only: false
+ url_plain: false
+ rel: ''
+ target: ''
+ third_party_settings: { }
+ type: link
+ region: content
+ links:
+ weight: 100
+ region: content
+ settings: { }
+ third_party_settings: { }
+hidden:
+ langcode: true
diff --git a/modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.teaser.yml b/modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.teaser.yml
new file mode 100644
index 0000000..da309d5
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/core.entity_view_display.node.international_transfer_program.teaser.yml
@@ -0,0 +1,37 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - core.entity_view_mode.node.teaser
+ - field.field.node.international_transfer_program.body
+ - field.field.node.international_transfer_program.field_country
+ - field.field.node.international_transfer_program.field_link_
+ - node.type.international_transfer_program
+ module:
+ - text
+ - user
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.teaser
+targetEntityType: node
+bundle: international_transfer_program
+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:
+ field_country: true
+ field_link_: true
+ langcode: true
diff --git a/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.body.yml b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.body.yml
new file mode 100644
index 0000000..6e1d9a4
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.body.yml
@@ -0,0 +1,24 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.body
+ - node.type.international_transfer_program
+ module:
+ - text
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.body
+field_name: body
+entity_type: node
+bundle: international_transfer_program
+label: 'Courses offered'
+description: 'Courses offered by the universty'
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ display_summary: true
+field_type: text_with_summary
diff --git a/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_country.yml b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_country.yml
new file mode 100644
index 0000000..e06d229
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_country.yml
@@ -0,0 +1,31 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_country
+ - node.type.international_transfer_program
+ - taxonomy.vocabulary.continent
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.field_country
+field_name: field_country
+entity_type: node
+bundle: international_transfer_program
+label: Country
+description: 'Country these Universities hail from '
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ continent: continent
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_link_.yml b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_link_.yml
new file mode 100644
index 0000000..a91b41a
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/field.field.node.international_transfer_program.field_link_.yml
@@ -0,0 +1,25 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_link_
+ - node.type.international_transfer_program
+ module:
+ - link
+ enforced:
+ module:
+ - international_transfer_program
+id: node.international_transfer_program.field_link_
+field_name: field_link_
+entity_type: node
+bundle: international_transfer_program
+label: 'Link '
+description: 'Link to University Site'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ link_type: 17
+ title: 1
+field_type: link
diff --git a/modules/mansimran/international_transfer_program/config/install/field.storage.node.field_country.yml b/modules/mansimran/international_transfer_program/config/install/field.storage.node.field_country.yml
new file mode 100644
index 0000000..f55fb70
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/field.storage.node.field_country.yml
@@ -0,0 +1,23 @@
+uuid: c654ef80-5314-4310-94b9-b63bd020ee15
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - taxonomy
+ enforced:
+ module:
+ - international_transfer_program
+id: node.field_country
+field_name: field_country
+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/international_transfer_program/config/install/field.storage.node.field_link_.yml b/modules/mansimran/international_transfer_program/config/install/field.storage.node.field_link_.yml
new file mode 100644
index 0000000..dc08f55
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/field.storage.node.field_link_.yml
@@ -0,0 +1,22 @@
+uuid: e3f5e53c-5cb3-457e-a83e-e7d59177cf48
+langcode: en
+status: true
+dependencies:
+ module:
+ - link
+ - node
+ enforced:
+ module:
+ - international_transfer_program
+id: node.field_link_
+field_name: field_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/mansimran/international_transfer_program/config/install/node.type.international_transfer_program.yml b/modules/mansimran/international_transfer_program/config/install/node.type.international_transfer_program.yml
new file mode 100644
index 0000000..1a7af9b
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/node.type.international_transfer_program.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - menu_ui
+ enforced:
+ module:
+ - international_transfer_program
+third_party_settings:
+ menu_ui:
+ available_menus:
+ - main
+ parent: 'main:'
+name: 'International Transfer Program'
+type: international_transfer_program
+description: 'The foreign Universities VIT is affliated with '
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: false
diff --git a/modules/mansimran/international_transfer_program/config/install/taxonomy.vocabulary.continent.yml b/modules/mansimran/international_transfer_program/config/install/taxonomy.vocabulary.continent.yml
new file mode 100644
index 0000000..bf855cf
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/config/install/taxonomy.vocabulary.continent.yml
@@ -0,0 +1,12 @@
+uuid: a5725386-67c9-44f9-9b47-efaec62ff7a1
+langcode: en
+status: true
+dependencies:
+ enforced:
+ module:
+ - international_transfer_program
+name: Country
+vid: continent
+description: 'Country where the university is from '
+hierarchy: 0
+weight: 0
diff --git a/modules/mansimran/international_transfer_program/international_transfer_program.info.yml b/modules/mansimran/international_transfer_program/international_transfer_program.info.yml
new file mode 100644
index 0000000..006ae84
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/international_transfer_program.info.yml
@@ -0,0 +1,13 @@
+name: 'international transfer program'
+type: module
+description: 'Importing itp content type'
+core: 8.x
+package: 'Custom'
+dependencies:
+ - drupal:node
+ - drupal:menu_ui
+ - drupal:taxonomy
+ - drupal:link
+ - drupal:path
+ - drupal:user
+ - drupal:text \ No newline at end of file
diff --git a/modules/mansimran/international_transfer_program/international_transfer_program.install b/modules/mansimran/international_transfer_program/international_transfer_program.install
new file mode 100644
index 0000000..5ee7ff5
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/international_transfer_program.install
@@ -0,0 +1,27 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function international_transfer_program_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', 'international_transfer_program');
+ $nids = $query->execute();
+
+
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}
+
diff --git a/modules/mansimran/international_transfer_program/international_transfer_program.module b/modules/mansimran/international_transfer_program/international_transfer_program.module
new file mode 100644
index 0000000..e9d514e
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/international_transfer_program.module
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains international_transfer_program.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function international_transfer_program_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ // Main module help for the international_transfer_program module.
+ case 'help.page.international_transfer_program':
+ $output = '';
+ $output .= '<h3>' . t('About') . '</h3>';
+ $output .= '<p>' . t('Importing itp content type') . '</p>';
+ return $output;
+
+ default:
+ }
+}
+
+/**
+ * Implements hook_theme().
+ */
+function international_transfer_program_theme() {
+ return [
+ 'international_transfer_program' => [
+ 'render element' => 'children',
+ ],
+ ];
+}
diff --git a/modules/mansimran/international_transfer_program/international_transfer_program.routing.yml b/modules/mansimran/international_transfer_program/international_transfer_program.routing.yml
new file mode 100644
index 0000000..f313f01
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/international_transfer_program.routing.yml
@@ -0,0 +1,8 @@
+
+international_transfer_program.itp_controller_hello:
+ path: '/international_transfer_program/hello/{name}'
+ defaults:
+ _controller: '\Drupal\international_transfer_program\Controller\itpController::hello'
+ _title: 'itpController'
+ requirements:
+ _permission: 'access content'
diff --git a/modules/mansimran/international_transfer_program/src/Controller/itpController.php b/modules/mansimran/international_transfer_program/src/Controller/itpController.php
new file mode 100644
index 0000000..a76697c
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/src/Controller/itpController.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\international_transfer_program\Controller;
+
+use Drupal\Core\Controller\ControllerBase;
+
+/**
+ * Class itpController.
+ */
+class itpController extends ControllerBase {
+
+ /**
+ * Hello.
+ *
+ * @return string
+ * Return Hello string.
+ */
+ public function hello($name) {
+ return [
+ '#type' => 'markup',
+ '#markup' => $this->t('Implement method: hello with parameter(s): $name'),
+ ];
+ }
+
+}
diff --git a/modules/mansimran/international_transfer_program/templates/international-transfer-program.html.twig b/modules/mansimran/international_transfer_program/templates/international-transfer-program.html.twig
new file mode 100644
index 0000000..91e43c8
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/templates/international-transfer-program.html.twig
@@ -0,0 +1 @@
+<!-- Add you custom twig html here --> \ No newline at end of file
diff --git a/modules/mansimran/international_transfer_program/tests/src/Functional/LoadTest.php b/modules/mansimran/international_transfer_program/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..b469416
--- /dev/null
+++ b/modules/mansimran/international_transfer_program/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\international_transfer_program\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group international_transfer_program
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['international_transfer_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);
+ }
+
+}