diff options
599 files changed, 20895 insertions, 1 deletions
diff --git a/modules/esha/achievements/achievements.info.yml b/modules/esha/achievements/achievements.info.yml new file mode 100644 index 0000000..3ed1004 --- /dev/null +++ b/modules/esha/achievements/achievements.info.yml @@ -0,0 +1,11 @@ +name: 'achievements' +type: module +description: 'Module for Achievements Placement Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:path + - drupal:user + - drupal:node + - drupal:taxonomy + - drupal:menu_ui diff --git a/modules/esha/achievements/achievements.install b/modules/esha/achievements/achievements.install new file mode 100644 index 0000000..4599c02 --- /dev/null +++ b/modules/esha/achievements/achievements.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function achievements_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', 'achievements'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/achievements/achievements.module b/modules/esha/achievements/achievements.module new file mode 100644 index 0000000..76939d9 --- /dev/null +++ b/modules/esha/achievements/achievements.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains achievements.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function achievements_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the achievements module. + case 'help.page.achievements': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Achievements Placement Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function achievements_theme() { + return [ + 'achievements' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/achievements/achievements.routing.yml b/modules/esha/achievements/achievements.routing.yml new file mode 100644 index 0000000..e3f475c --- /dev/null +++ b/modules/esha/achievements/achievements.routing.yml @@ -0,0 +1,8 @@ + +achievements.achievement_controller_hello: + path: '/achievements/hello/{name}' + defaults: + _controller: '\Drupal\achievements\Controller\achievementController::hello' + _title: 'control' + requirements: + _permission: 'access content' diff --git a/modules/esha/achievements/composer.json b/modules/esha/achievements/composer.json new file mode 100644 index 0000000..34e90d8 --- /dev/null +++ b/modules/esha/achievements/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/achievements", + "type": "drupal-module", + "description": "Module for Achievements Placement Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/achievements", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/achievements", + "source": "http://cgit.drupalcode.org/achievements" + }, + "require": { } +} diff --git a/modules/esha/achievements/config/install/core.entity_form_display.node.achievements.default.yml b/modules/esha/achievements/config/install/core.entity_form_display.node.achievements.default.yml new file mode 100644 index 0000000..d77ebe5 --- /dev/null +++ b/modules/esha/achievements/config/install/core.entity_form_display.node.achievements.default.yml @@ -0,0 +1,92 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.achievements.field_achievement_description + - field.field.node.achievements.field_achievement_type + - node.type.achievements + module: + - path + enforced: + module: + - achievements +id: node.achievements.default +targetEntityType: node +bundle: achievements +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_achievement_description: + weight: 123 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: string_textarea + region: content + field_achievement_type: + 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/esha/achievements/config/install/core.entity_view_display.node.achievements.default.yml b/modules/esha/achievements/config/install/core.entity_view_display.node.achievements.default.yml new file mode 100644 index 0000000..1ed7439 --- /dev/null +++ b/modules/esha/achievements/config/install/core.entity_view_display.node.achievements.default.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.achievements.field_achievement_description + - field.field.node.achievements.field_achievement_type + - node.type.achievements + module: + - user + enforced: + module: + - achievements +id: node.achievements.default +targetEntityType: node +bundle: achievements +mode: default +content: + field_achievement_description: + weight: 103 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_achievement_type: + weight: 102 + 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/esha/achievements/config/install/core.entity_view_display.node.achievements.teaser.yml b/modules/esha/achievements/config/install/core.entity_view_display.node.achievements.teaser.yml new file mode 100644 index 0000000..a10099d --- /dev/null +++ b/modules/esha/achievements/config/install/core.entity_view_display.node.achievements.teaser.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.achievements.field_achievement_type + - node.type.achievements + module: + - user + enforced: + module: + - achievements +id: node.achievements.teaser +targetEntityType: node +bundle: achievements +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_achievement_type: true + langcode: true diff --git a/modules/esha/achievements/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/achievements/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..83ada37 --- /dev/null +++ b/modules/esha/achievements/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,15 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - achievements +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_description.yml b/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_description.yml new file mode 100644 index 0000000..99b94d2 --- /dev/null +++ b/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_description.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_achievement_description + - node.type.achievements + enforced: + module: + - achievements +id: node.achievements.field_achievement_description +field_name: field_achievement_description +entity_type: node +bundle: achievements +label: 'Achievement Description' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_type.yml b/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_type.yml new file mode 100644 index 0000000..24f0ec1 --- /dev/null +++ b/modules/esha/achievements/config/install/field.field.node.achievements.field_achievement_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_achievement_type + - node.type.achievements + - taxonomy.vocabulary.achievement + enforced: + module: + - achievements +id: node.achievements.field_achievement_type +field_name: field_achievement_type +entity_type: node +bundle: achievements +label: 'Achievement Type' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + achievement: achievement + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/esha/achievements/config/install/field.storage.node.field_achievement_description.yml b/modules/esha/achievements/config/install/field.storage.node.field_achievement_description.yml new file mode 100644 index 0000000..fcd5c47 --- /dev/null +++ b/modules/esha/achievements/config/install/field.storage.node.field_achievement_description.yml @@ -0,0 +1,22 @@ +uuid: 10af3d6e-5dd8-4248-a517-ad48ef3d8f62 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - achievements +id: node.field_achievement_description +field_name: field_achievement_description +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/esha/achievements/config/install/field.storage.node.field_achievement_type.yml b/modules/esha/achievements/config/install/field.storage.node.field_achievement_type.yml new file mode 100644 index 0000000..6a01531 --- /dev/null +++ b/modules/esha/achievements/config/install/field.storage.node.field_achievement_type.yml @@ -0,0 +1,23 @@ +uuid: 01281d95-1c9e-4ada-b282-a81737d96e79 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - achievements +id: node.field_achievement_type +field_name: field_achievement_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/esha/achievements/config/install/migrate_plus.migration.sample_achievements_import.yml b/modules/esha/achievements/config/install/migrate_plus.migration.sample_achievements_import.yml new file mode 100644 index 0000000..41919df --- /dev/null +++ b/modules/esha/achievements/config/install/migrate_plus.migration.sample_achievements_import.yml @@ -0,0 +1,36 @@ +uuid: 3397f245-46fb-426c-bc42-4ea803dca435 +langcode: en +status: true +id: sample_achievements_import +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: null +migration_group: default +label: 'Sample Achievements Import' +source: + plugin: csv + path: /var/www/CSV/achievements_sample.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: achievements + title: title + field_achievement_description: description + field_achievement_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: achievement + source: type +destination: + plugin: 'entity:node' + bundle: achievements +migration_dependencies: + required: { } + optional: { } diff --git a/modules/esha/achievements/config/install/node.type.achievements.yml b/modules/esha/achievements/config/install/node.type.achievements.yml new file mode 100644 index 0000000..f2fccbb --- /dev/null +++ b/modules/esha/achievements/config/install/node.type.achievements.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - achievements +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Achievements +type: achievements +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/achievements/config/install/taxonomy.vocabulary.achievement.yml b/modules/esha/achievements/config/install/taxonomy.vocabulary.achievement.yml new file mode 100644 index 0000000..0d6ce9c --- /dev/null +++ b/modules/esha/achievements/config/install/taxonomy.vocabulary.achievement.yml @@ -0,0 +1,12 @@ +uuid: 67cd72f5-de5c-476a-b102-813963ef0b9f +langcode: en +status: true +dependencies: + enforced: + module: + - achievements +name: Achievement +vid: achievement +description: 'Achieved by Staff/Students' +hierarchy: 0 +weight: 0 diff --git a/modules/esha/achievements/src/Controller/achievementController.php b/modules/esha/achievements/src/Controller/achievementController.php new file mode 100644 index 0000000..04f947e --- /dev/null +++ b/modules/esha/achievements/src/Controller/achievementController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\achievements\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class achievementController. + */ +class achievementController 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/esha/achievements/templates/achievements.html.twig b/modules/esha/achievements/templates/achievements.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/achievements/templates/achievements.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/achievements/tests/src/Functional/LoadTest.php b/modules/esha/achievements/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..0d54e64 --- /dev/null +++ b/modules/esha/achievements/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\achievements\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group achievements + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['achievements']; + + /** + * 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/esha/corporate/composer.json b/modules/esha/corporate/composer.json new file mode 100644 index 0000000..f8f0e32 --- /dev/null +++ b/modules/esha/corporate/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/corporate", + "type": "drupal-module", + "description": "Module for Corporate Advisory Board Content Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/corporate", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/corporate", + "source": "http://cgit.drupalcode.org/corporate" + }, + "require": { } +} diff --git a/modules/esha/corporate/config/install/core.entity_form_display.node.corporate_advisory_board.default.yml b/modules/esha/corporate/config/install/core.entity_form_display.node.corporate_advisory_board.default.yml new file mode 100644 index 0000000..d36c401 --- /dev/null +++ b/modules/esha/corporate/config/install/core.entity_form_display.node.corporate_advisory_board.default.yml @@ -0,0 +1,112 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.corporate_advisory_board.field_company_image + - field.field.node.corporate_advisory_board.field_company_website + - field.field.node.corporate_advisory_board.field_designation + - field.field.node.corporate_advisory_board.field_member_image + - image.style.thumbnail + - node.type.corporate_advisory_board + module: + - image + - link + - path + enforced: + module: + - corporate +id: node.corporate_advisory_board.default +targetEntityType: node +bundle: corporate_advisory_board +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_company_image: + weight: 124 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_company_website: + weight: 127 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_designation: + weight: 126 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_member_image: + weight: 123 + 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/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.default.yml b/modules/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.default.yml new file mode 100644 index 0000000..b543a8c --- /dev/null +++ b/modules/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.default.yml @@ -0,0 +1,66 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.corporate_advisory_board.field_company_image + - field.field.node.corporate_advisory_board.field_company_website + - field.field.node.corporate_advisory_board.field_designation + - field.field.node.corporate_advisory_board.field_member_image + - node.type.corporate_advisory_board + module: + - image + - link + - user + enforced: + module: + - corporate +id: node.corporate_advisory_board.default +targetEntityType: node +bundle: corporate_advisory_board +mode: default +content: + field_company_image: + weight: 104 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_company_website: + weight: 107 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_designation: + weight: 106 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_member_image: + weight: 103 + 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/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.teaser.yml b/modules/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.teaser.yml new file mode 100644 index 0000000..999478f --- /dev/null +++ b/modules/esha/corporate/config/install/core.entity_view_display.node.corporate_advisory_board.teaser.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.corporate_advisory_board.field_company_image + - field.field.node.corporate_advisory_board.field_company_website + - field.field.node.corporate_advisory_board.field_designation + - field.field.node.corporate_advisory_board.field_member_image + - node.type.corporate_advisory_board + module: + - user + enforced: + module: + - corporate +id: node.corporate_advisory_board.teaser +targetEntityType: node +bundle: corporate_advisory_board +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_company_image: true + field_company_website: true + field_designation: true + field_member_image: true + langcode: true diff --git a/modules/esha/corporate/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/corporate/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..4632edd --- /dev/null +++ b/modules/esha/corporate/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,15 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - corporate +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_image.yml b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_image.yml new file mode 100644 index 0000000..f56d0c8 --- /dev/null +++ b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_image + - node.type.corporate_advisory_board + module: + - image + enforced: + module: + - corporate +id: node.corporate_advisory_board.field_company_image +field_name: field_company_image +entity_type: node +bundle: corporate_advisory_board +label: 'Company Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: company_images + 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/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_website.yml b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_website.yml new file mode 100644 index 0000000..c7ed791 --- /dev/null +++ b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_company_website.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_website + - node.type.corporate_advisory_board + module: + - link + enforced: + module: + - corporate +id: node.corporate_advisory_board.field_company_website +field_name: field_company_website +entity_type: node +bundle: corporate_advisory_board +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/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_designation.yml b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_designation.yml new file mode 100644 index 0000000..0cc1355 --- /dev/null +++ b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_designation.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_designation + - node.type.corporate_advisory_board + enforced: + module: + - corporate +id: node.corporate_advisory_board.field_designation +field_name: field_designation +entity_type: node +bundle: corporate_advisory_board +label: Designation +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_member_image.yml b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_member_image.yml new file mode 100644 index 0000000..7369e23 --- /dev/null +++ b/modules/esha/corporate/config/install/field.field.node.corporate_advisory_board.field_member_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_member_image + - node.type.corporate_advisory_board + module: + - image + enforced: + module: + - corporate +id: node.corporate_advisory_board.field_member_image +field_name: field_member_image +entity_type: node +bundle: corporate_advisory_board +label: 'Member Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: member_images + 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/esha/corporate/config/install/field.storage.node.field_company_image.yml b/modules/esha/corporate/config/install/field.storage.node.field_company_image.yml new file mode 100644 index 0000000..04fafea --- /dev/null +++ b/modules/esha/corporate/config/install/field.storage.node.field_company_image.yml @@ -0,0 +1,33 @@ +uuid: 336c9ebe-441b-4df5-a485-f0952792019a +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - corporate +id: node.field_company_image +field_name: field_company_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/esha/corporate/config/install/field.storage.node.field_company_website.yml b/modules/esha/corporate/config/install/field.storage.node.field_company_website.yml new file mode 100644 index 0000000..042889c --- /dev/null +++ b/modules/esha/corporate/config/install/field.storage.node.field_company_website.yml @@ -0,0 +1,22 @@ +uuid: 72f4d1c6-fa6c-4cc5-9576-459ec47a6b92 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - corporate +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/esha/corporate/config/install/field.storage.node.field_designation.yml b/modules/esha/corporate/config/install/field.storage.node.field_designation.yml new file mode 100644 index 0000000..290e6bd --- /dev/null +++ b/modules/esha/corporate/config/install/field.storage.node.field_designation.yml @@ -0,0 +1,24 @@ +uuid: d9a05868-ce4b-438b-a119-010249e41825 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - corporate +id: node.field_designation +field_name: field_designation +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/esha/corporate/config/install/field.storage.node.field_member_image.yml b/modules/esha/corporate/config/install/field.storage.node.field_member_image.yml new file mode 100644 index 0000000..853284c --- /dev/null +++ b/modules/esha/corporate/config/install/field.storage.node.field_member_image.yml @@ -0,0 +1,33 @@ +uuid: 84e3a771-4aa4-4043-9aa2-cd55ab247360 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - corporate +id: node.field_member_image +field_name: field_member_image +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: a9cd611f-92e3-4762-a504-f6b017a5136c + alt: '' + title: '' + width: 65 + height: 84 + 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/esha/corporate/config/install/image.style.thumbnail.yml b/modules/esha/corporate/config/install/image.style.thumbnail.yml new file mode 100644 index 0000000..7389c76 --- /dev/null +++ b/modules/esha/corporate/config/install/image.style.thumbnail.yml @@ -0,0 +1,20 @@ +uuid: 253400b6-2e54-4c6a-92ba-9ccb091444e2 +langcode: en +status: true +dependencies: + enforced: + module: + - corporate +_core: + default_config_hash: cCiWdBHgLwj5omG35lsKc4LkW4MBdmcctkVop4ol5x0 +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/esha/corporate/config/install/migrate_plus.migration.cab_import.yml b/modules/esha/corporate/config/install/migrate_plus.migration.cab_import.yml new file mode 100644 index 0000000..fbed94a --- /dev/null +++ b/modules/esha/corporate/config/install/migrate_plus.migration.cab_import.yml @@ -0,0 +1,69 @@ +uuid: 52455ef5-b766-4149-94d0-aa2af3ef7639 +id: cab_import +label: cab +migration_group: default +source: + plugin: csv + # Full path to the file. + path: '/var/www/CSV/corp1.csv' + # Column delimiter. Comma (,) by default. + delimiter: ',' + # Field enclosure. Double quotation marks (") by default. + enclosure: '"' + # The number of rows at the beginning which are not data. + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/corporate + file_dest: 'public://member_images/' + file_source2: /var/www/corporate + file_dest2: 'public://company_images/' +process: + type: + plugin: default_value + default_value: corporate_advisory_board + source_path: + - + plugin: skip_on_empty + method: process + source: memberimg + - + plugin: concat + delimiter: / + source: + - constants/file_source + - memberimg + source_path2: + - + plugin: skip_on_empty + method: process + source: companyimg + - + plugin: concat + delimiter: / + source: + - constants/file_source2 + - companyimg + title: title + body/value: body + body/format: + - + plugin: default_value + default_value: basic_html + field_company_website/uri: website + field_designation: designation + field_member_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_company_image: + plugin: file_import + source: '@source_path2' + destination: constants/file_dest2 +destination: + plugin: 'entity:node' + bundle: corporate_advisory_board +migration_dependencies: + required: { } + optional: { } diff --git a/modules/esha/corporate/config/install/node.type.corporate_advisory_board.yml b/modules/esha/corporate/config/install/node.type.corporate_advisory_board.yml new file mode 100644 index 0000000..5f30bd4 --- /dev/null +++ b/modules/esha/corporate/config/install/node.type.corporate_advisory_board.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - corporate +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Corporate Advisory Board' +type: corporate_advisory_board +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/corporate/corporate.info.yml b/modules/esha/corporate/corporate.info.yml new file mode 100644 index 0000000..305c165 --- /dev/null +++ b/modules/esha/corporate/corporate.info.yml @@ -0,0 +1,14 @@ +name: 'corporate' +type: module +description: 'Module for Corporate Advisory Board Content Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:menu_ui + - drupal:image + - drupal:link + - drupal:path + - drupal:user + - drupal:node + - drupal:image + - drupal:file
\ No newline at end of file diff --git a/modules/esha/corporate/corporate.install b/modules/esha/corporate/corporate.install new file mode 100644 index 0000000..2a56fd7 --- /dev/null +++ b/modules/esha/corporate/corporate.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function corporate_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', 'corporate_advisory_board'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/corporate/corporate.module b/modules/esha/corporate/corporate.module new file mode 100644 index 0000000..de3e265 --- /dev/null +++ b/modules/esha/corporate/corporate.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains corporate.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function corporate_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the corporate module. + case 'help.page.corporate': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Corporate Advisory Board Content Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function corporate_theme() { + return [ + 'corporate' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/corporate/templates/corporate.html.twig b/modules/esha/corporate/templates/corporate.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/corporate/templates/corporate.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/corporate/tests/src/Functional/LoadTest.php b/modules/esha/corporate/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..8e09521 --- /dev/null +++ b/modules/esha/corporate/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\corporate\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group corporate + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['corporate']; + + /** + * 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/esha/lab/composer.json b/modules/esha/lab/composer.json new file mode 100644 index 0000000..70ee9e7 --- /dev/null +++ b/modules/esha/lab/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/lab", + "type": "drupal-module", + "description": "Module for Lab Content Tyoe", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/lab", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/lab", + "source": "http://cgit.drupalcode.org/lab" + }, + "require": { } +} diff --git a/modules/esha/lab/config/install/core.entity_form_display.node.lab.default.yml b/modules/esha/lab/config/install/core.entity_form_display.node.lab.default.yml new file mode 100644 index 0000000..71f1994 --- /dev/null +++ b/modules/esha/lab/config/install/core.entity_form_display.node.lab.default.yml @@ -0,0 +1,138 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.lab.field_description_ + - field.field.node.lab.field_faculty_e_mail + - field.field.node.lab.field_faculty_incharge + - field.field.node.lab.field_faculty_phone_no + - field.field.node.lab.field_hardware_software_details + - field.field.node.lab.field_location + - field.field.node.lab.field_programmer_name + - node.type.lab + module: + - paragraphs + - path +id: node.lab.default +targetEntityType: node +bundle: lab +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_description_: + weight: 129 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: string_textarea + region: content + field_faculty_e_mail: + weight: 127 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: email_default + region: content + field_faculty_incharge: + weight: 124 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_faculty_phone_no: + weight: 128 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_hardware_software_details: + type: entity_reference_paragraphs + weight: 126 + 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_location: + weight: 122 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_programmer_name: + weight: 125 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_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/esha/lab/config/install/core.entity_view_display.node.lab.default.yml b/modules/esha/lab/config/install/core.entity_view_display.node.lab.default.yml new file mode 100644 index 0000000..d2e7fb7 --- /dev/null +++ b/modules/esha/lab/config/install/core.entity_view_display.node.lab.default.yml @@ -0,0 +1,83 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.lab.field_description_ + - field.field.node.lab.field_faculty_e_mail + - field.field.node.lab.field_faculty_incharge + - field.field.node.lab.field_faculty_phone_no + - field.field.node.lab.field_hardware_software_details + - field.field.node.lab.field_location + - field.field.node.lab.field_programmer_name + - node.type.lab + module: + - entity_reference_revisions + - user +id: node.lab.default +targetEntityType: node +bundle: lab +mode: default +content: + field_description_: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_faculty_e_mail: + weight: 107 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_faculty_incharge: + weight: 104 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_faculty_phone_no: + weight: 108 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_hardware_software_details: + type: entity_reference_revisions_entity_view + weight: 106 + label: above + settings: + view_mode: default + link: '' + third_party_settings: { } + region: content + field_location: + weight: 102 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_programmer_name: + weight: 105 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/esha/lab/config/install/core.entity_view_display.node.lab.teaser.yml b/modules/esha/lab/config/install/core.entity_view_display.node.lab.teaser.yml new file mode 100644 index 0000000..41ceb2a --- /dev/null +++ b/modules/esha/lab/config/install/core.entity_view_display.node.lab.teaser.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.lab.field_location + - node.type.lab + module: + - user +id: node.lab.teaser +targetEntityType: node +bundle: lab +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_location: true + langcode: true diff --git a/modules/esha/lab/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/lab/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..fb7a35a --- /dev/null +++ b/modules/esha/lab/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/lab/config/install/field.field.node.lab.field_description_.yml b/modules/esha/lab/config/install/field.field.node.lab.field_description_.yml new file mode 100644 index 0000000..d604ec4 --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_description_.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_description_ + - node.type.lab +id: node.lab.field_description_ +field_name: field_description_ +entity_type: node +bundle: lab +label: Description +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/modules/esha/lab/config/install/field.field.node.lab.field_faculty_e_mail.yml b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_e_mail.yml new file mode 100644 index 0000000..39dfaeb --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_e_mail.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_e_mail + - node.type.lab +id: node.lab.field_faculty_e_mail +field_name: field_faculty_e_mail +entity_type: node +bundle: lab +label: 'Faculty E-Mail' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: email diff --git a/modules/esha/lab/config/install/field.field.node.lab.field_faculty_incharge.yml b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_incharge.yml new file mode 100644 index 0000000..21bfc1c --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_incharge.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_incharge + - node.type.fac_page + - node.type.lab +id: node.lab.field_faculty_incharge +field_name: field_faculty_incharge +entity_type: node +bundle: lab +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/esha/lab/config/install/field.field.node.lab.field_faculty_phone_no.yml b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_phone_no.yml new file mode 100644 index 0000000..9e0b7bd --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_faculty_phone_no.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_phone_no + - node.type.lab +id: node.lab.field_faculty_phone_no +field_name: field_faculty_phone_no +entity_type: node +bundle: lab +label: 'Faculty Phone 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/esha/lab/config/install/field.field.node.lab.field_hardware_software_details.yml b/modules/esha/lab/config/install/field.field.node.lab.field_hardware_software_details.yml new file mode 100644 index 0000000..a51d802 --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_hardware_software_details.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_hardware_software_details + - node.type.lab + - paragraphs.paragraphs_type.hardware_and_software + module: + - entity_reference_revisions +id: node.lab.field_hardware_software_details +field_name: field_hardware_software_details +entity_type: node +bundle: lab +label: 'Hardware Software Details' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + hardware_and_software: hardware_and_software + target_bundles_drag_drop: + hardware_and_software: + enabled: true + weight: 3 + r_d_projects: + weight: 4 + enabled: false +field_type: entity_reference_revisions diff --git a/modules/esha/lab/config/install/field.field.node.lab.field_location.yml b/modules/esha/lab/config/install/field.field.node.lab.field_location.yml new file mode 100644 index 0000000..d1eb382 --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_location.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_location + - node.type.lab +id: node.lab.field_location +field_name: field_location +entity_type: node +bundle: lab +label: Location +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/esha/lab/config/install/field.field.node.lab.field_programmer_name.yml b/modules/esha/lab/config/install/field.field.node.lab.field_programmer_name.yml new file mode 100644 index 0000000..d192d1c --- /dev/null +++ b/modules/esha/lab/config/install/field.field.node.lab.field_programmer_name.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_programmer_name + - node.type.lab +id: node.lab.field_programmer_name +field_name: field_programmer_name +entity_type: node +bundle: lab +label: 'Programmer Name' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/esha/lab/config/install/field.storage.node.field_description_.yml b/modules/esha/lab/config/install/field.storage.node.field_description_.yml new file mode 100644 index 0000000..c156a3f --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_description_.yml @@ -0,0 +1,19 @@ +uuid: 7083d7bf-4a82-442a-b247-b5e3efefee5f +langcode: en +status: true +dependencies: + module: + - node +id: node.field_description_ +field_name: field_description_ +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/esha/lab/config/install/field.storage.node.field_faculty_e_mail.yml b/modules/esha/lab/config/install/field.storage.node.field_faculty_e_mail.yml new file mode 100644 index 0000000..de20bf6 --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_faculty_e_mail.yml @@ -0,0 +1,18 @@ +uuid: a72bd7c5-3bcc-469c-bc4d-7e53dcdecbfc +langcode: en +status: true +dependencies: + module: + - node +id: node.field_faculty_e_mail +field_name: field_faculty_e_mail +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/esha/lab/config/install/field.storage.node.field_faculty_incharge.yml b/modules/esha/lab/config/install/field.storage.node.field_faculty_incharge.yml new file mode 100644 index 0000000..0740b62 --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_faculty_incharge.yml @@ -0,0 +1,19 @@ +uuid: 72d5df56-23f1-40ee-9cdb-47ce8ccd35dd +langcode: en +status: true +dependencies: + module: + - node +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/esha/lab/config/install/field.storage.node.field_faculty_phone_no.yml b/modules/esha/lab/config/install/field.storage.node.field_faculty_phone_no.yml new file mode 100644 index 0000000..bdf060a --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_faculty_phone_no.yml @@ -0,0 +1,20 @@ +uuid: cb625a44-0a19-4b8f-ba64-ecccd03f85fb +langcode: en +status: true +dependencies: + module: + - node +id: node.field_faculty_phone_no +field_name: field_faculty_phone_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/esha/lab/config/install/field.storage.node.field_hardware_software_details.yml b/modules/esha/lab/config/install/field.storage.node.field_hardware_software_details.yml new file mode 100644 index 0000000..09fbf27 --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_hardware_software_details.yml @@ -0,0 +1,21 @@ +uuid: 40b4ca5d-093c-45da-8170-51f3bee83c1b +langcode: en +status: true +dependencies: + module: + - entity_reference_revisions + - node + - paragraphs +id: node.field_hardware_software_details +field_name: field_hardware_software_details +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/esha/lab/config/install/field.storage.node.field_location.yml b/modules/esha/lab/config/install/field.storage.node.field_location.yml new file mode 100644 index 0000000..d5ce75d --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_location.yml @@ -0,0 +1,21 @@ +uuid: 55b23e0b-33a5-4ed4-9d9a-17ee0abf3440 +langcode: en +status: true +dependencies: + module: + - node +id: node.field_location +field_name: field_location +entity_type: node +type: string +settings: + max_length: 300 + 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/esha/lab/config/install/field.storage.node.field_programmer_name.yml b/modules/esha/lab/config/install/field.storage.node.field_programmer_name.yml new file mode 100644 index 0000000..b5c1a4c --- /dev/null +++ b/modules/esha/lab/config/install/field.storage.node.field_programmer_name.yml @@ -0,0 +1,21 @@ +uuid: 6db8388e-26d0-489f-a2c8-b97aeaba5951 +langcode: en +status: true +dependencies: + module: + - node +id: node.field_programmer_name +field_name: field_programmer_name +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/esha/lab/config/install/node.type.fac_page.yml b/modules/esha/lab/config/install/node.type.fac_page.yml new file mode 100644 index 0000000..47f8ffb --- /dev/null +++ b/modules/esha/lab/config/install/node.type.fac_page.yml @@ -0,0 +1,23 @@ +uuid: b7471e78-83f0-4359-9512-d4a8f02c2218 +langcode: en +status: true +dependencies: + enforced: + module: + - acadmix_faculty + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +_core: + default_config_hash: yZnGgm-oTEuH3Qz8VcW49f94qFn-pYOYZdrX601an0U +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/esha/lab/config/install/node.type.lab.yml b/modules/esha/lab/config/install/node.type.lab.yml new file mode 100644 index 0000000..e5a2e2a --- /dev/null +++ b/modules/esha/lab/config/install/node.type.lab.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Lab +type: lab +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/lab/config/install/paragraphs.paragraphs_type.hardware_and_software.yml b/modules/esha/lab/config/install/paragraphs.paragraphs_type.hardware_and_software.yml new file mode 100644 index 0000000..f7b105e --- /dev/null +++ b/modules/esha/lab/config/install/paragraphs.paragraphs_type.hardware_and_software.yml @@ -0,0 +1,9 @@ +uuid: c3df85d3-cc1d-408b-b115-17a70677f6d8 +langcode: en +status: true +dependencies: { } +id: hardware_and_software +label: 'Hardware and Software' +icon_uuid: null +description: '' +behavior_plugins: { } diff --git a/modules/esha/lab/lab.info.yml b/modules/esha/lab/lab.info.yml new file mode 100644 index 0000000..8507cd7 --- /dev/null +++ b/modules/esha/lab/lab.info.yml @@ -0,0 +1,12 @@ +name: 'lab' +type: module +description: 'Module for Lab Content Tyoe' +core: 8.x +package: 'Custom' +dependencies: + - drupal:paragraphs + - drupal:path + - drupal:entity_reference_revisions + - drupal:user + - drupal:node + - drupal:menu_ui diff --git a/modules/esha/lab/lab.install b/modules/esha/lab/lab.install new file mode 100644 index 0000000..376861b --- /dev/null +++ b/modules/esha/lab/lab.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function lab_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', 'lab'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/lab/lab.module b/modules/esha/lab/lab.module new file mode 100644 index 0000000..65a0b7e --- /dev/null +++ b/modules/esha/lab/lab.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains lab.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function lab_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the lab module. + case 'help.page.lab': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Lab Content Tyoe') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function lab_theme() { + return [ + 'lab' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/lab/templates/lab.html.twig b/modules/esha/lab/templates/lab.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/lab/templates/lab.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/lab/tests/src/Functional/LoadTest.php b/modules/esha/lab/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..918be07 --- /dev/null +++ b/modules/esha/lab/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\lab\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group lab + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['lab']; + + /** + * 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/esha/labmanual/composer.json b/modules/esha/labmanual/composer.json new file mode 100644 index 0000000..babdf95 --- /dev/null +++ b/modules/esha/labmanual/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/labmanual", + "type": "drupal-module", + "description": "Module for Lab Manual Content Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/labmanual", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/labmanual", + "source": "http://cgit.drupalcode.org/labmanual" + }, + "require": { } +} diff --git a/modules/esha/labmanual/config/install/core.entity_form_display.node.lab_manual.default.yml b/modules/esha/labmanual/config/install/core.entity_form_display.node.lab_manual.default.yml new file mode 100644 index 0000000..084c912 --- /dev/null +++ b/modules/esha/labmanual/config/install/core.entity_form_display.node.lab_manual.default.yml @@ -0,0 +1,91 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.lab_manual.field_description + - field.field.node.lab_manual.field_manual + - node.type.lab_manual + module: + - file + - path + enforced: + module: + - labmanual +id: node.lab_manual.default +targetEntityType: node +bundle: lab_manual +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_description: + weight: 122 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: string_textarea + region: content + field_manual: + weight: 123 + 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/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.default.yml b/modules/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.default.yml new file mode 100644 index 0000000..a04bdb4 --- /dev/null +++ b/modules/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.default.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.lab_manual.field_description + - field.field.node.lab_manual.field_manual + - node.type.lab_manual + module: + - file + - user + enforced: + module: + - labmanual +id: node.lab_manual.default +targetEntityType: node +bundle: lab_manual +mode: default +content: + field_description: + weight: 102 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_manual: + weight: 103 + 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/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.teaser.yml b/modules/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.teaser.yml new file mode 100644 index 0000000..d083bbc --- /dev/null +++ b/modules/esha/labmanual/config/install/core.entity_view_display.node.lab_manual.teaser.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.lab_manual.field_description + - field.field.node.lab_manual.field_manual + - node.type.lab_manual + module: + - user + enforced: + module: + - labmanual +id: node.lab_manual.teaser +targetEntityType: node +bundle: lab_manual +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_description: true + field_manual: true + langcode: true diff --git a/modules/esha/labmanual/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/labmanual/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..ce0398e --- /dev/null +++ b/modules/esha/labmanual/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,15 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - labmanual +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_description.yml b/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_description.yml new file mode 100644 index 0000000..e31a4ba --- /dev/null +++ b/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_description.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_description + - node.type.lab_manual + enforced: + module: + - labmanual +id: node.lab_manual.field_description +field_name: field_description +entity_type: node +bundle: lab_manual +label: Description +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_manual.yml b/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_manual.yml new file mode 100644 index 0000000..b953977 --- /dev/null +++ b/modules/esha/labmanual/config/install/field.field.node.lab_manual.field_manual.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_manual + - node.type.lab_manual + module: + - file + enforced: + module: + - labmanual +id: node.lab_manual.field_manual +field_name: field_manual +entity_type: node +bundle: lab_manual +label: Manual +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: lab_manuals + file_extensions: pdf + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/esha/labmanual/config/install/field.storage.node.field_description.yml b/modules/esha/labmanual/config/install/field.storage.node.field_description.yml new file mode 100644 index 0000000..f272899 --- /dev/null +++ b/modules/esha/labmanual/config/install/field.storage.node.field_description.yml @@ -0,0 +1,22 @@ +uuid: 2607b4e4-518c-4aff-9b49-5f398e718487 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - labmanual +id: node.field_description +field_name: field_description +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/esha/labmanual/config/install/field.storage.node.field_manual.yml b/modules/esha/labmanual/config/install/field.storage.node.field_manual.yml new file mode 100644 index 0000000..9070112 --- /dev/null +++ b/modules/esha/labmanual/config/install/field.storage.node.field_manual.yml @@ -0,0 +1,26 @@ +uuid: 9772805f-ffb2-443f-afdd-0bc6dfd48416 +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - labmanual +id: node.field_manual +field_name: field_manual +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/esha/labmanual/config/install/migrate_plus.migration.labmanuals_import.yml b/modules/esha/labmanual/config/install/migrate_plus.migration.labmanuals_import.yml new file mode 100644 index 0000000..e6e6a38 --- /dev/null +++ b/modules/esha/labmanual/config/install/migrate_plus.migration.labmanuals_import.yml @@ -0,0 +1,51 @@ +uuid: c04b2ca4-cd30-4aa3-b742-d558a856d094 +id: labmanuals_import +label: labmanual +migration_group: default +source: + plugin: csv + # Full path to the file. + path: '/var/www/CSV/LabManual.csv' + # Column delimiter. Comma (,) by default. + delimiter: ',' + # Field enclosure. Double quotation marks (") by default. + enclosure: '"' + # The number of rows at the beginning which are not data. + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/LabManuals + file_dest: 'public://lab_manuals/' +process: + type: + plugin: default_value + default_value: lab_manual + source_path: + - + plugin: skip_on_empty + method: process + source: manual + - + plugin: concat + delimiter: / + source: + - constants/file_source + - manual + title: title + body/value: body + body/format: + - + plugin: default_value + default_value: basic_html + field_description: description + field_manual: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: lab_manual +migration_dependencies: + required: { } + optional: { } diff --git a/modules/esha/labmanual/config/install/node.type.lab_manual.yml b/modules/esha/labmanual/config/install/node.type.lab_manual.yml new file mode 100644 index 0000000..f624421 --- /dev/null +++ b/modules/esha/labmanual/config/install/node.type.lab_manual.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - labmanual +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Lab Manual' +type: lab_manual +description: '' +help: '' +new_revision: false +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/labmanual/labmanual.info.yml b/modules/esha/labmanual/labmanual.info.yml new file mode 100644 index 0000000..9bfe438 --- /dev/null +++ b/modules/esha/labmanual/labmanual.info.yml @@ -0,0 +1,12 @@ +name: 'labmanual' +type: module +description: 'Module for Lab Manual Content Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:path + - drupal:user + - drupal:node + - drupal:file + - drupal:menu_ui
\ No newline at end of file diff --git a/modules/esha/labmanual/labmanual.install b/modules/esha/labmanual/labmanual.install new file mode 100644 index 0000000..e2c0ed3 --- /dev/null +++ b/modules/esha/labmanual/labmanual.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function labmanual_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', 'lab_manual'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/labmanual/labmanual.module b/modules/esha/labmanual/labmanual.module new file mode 100644 index 0000000..5782054 --- /dev/null +++ b/modules/esha/labmanual/labmanual.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains labmanual.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function labmanual_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the labmanual module. + case 'help.page.labmanual': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Lab Manual Content Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function labmanual_theme() { + return [ + 'labmanual' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/labmanual/templates/labmanual.html.twig b/modules/esha/labmanual/templates/labmanual.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/labmanual/templates/labmanual.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/labmanual/tests/src/Functional/LoadTest.php b/modules/esha/labmanual/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..e548812 --- /dev/null +++ b/modules/esha/labmanual/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\labmanual\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group labmanual + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['labmanual']; + + /** + * 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/esha/onlinecourse/composer.json b/modules/esha/onlinecourse/composer.json new file mode 100644 index 0000000..9d4a149 --- /dev/null +++ b/modules/esha/onlinecourse/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/onlinecourse", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/onlinecourse", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/onlinecourse", + "source": "http://cgit.drupalcode.org/onlinecourse" + }, + "require": { } +} diff --git a/modules/esha/onlinecourse/config/install/core.entity_form_display.node.online_course.default.yml b/modules/esha/onlinecourse/config/install/core.entity_form_display.node.online_course.default.yml new file mode 100644 index 0000000..86b561a --- /dev/null +++ b/modules/esha/onlinecourse/config/install/core.entity_form_display.node.online_course.default.yml @@ -0,0 +1,99 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.online_course.field_faculty_name + - field.field.node.online_course.field_link_to_cour + - field.field.node.online_course.field_offered_by + - node.type.online_course + module: + - link + - path +id: node.online_course.default +targetEntityType: node +bundle: online_course +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_faculty_name: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_link_to_cour: + weight: 124 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_offered_by: + weight: 123 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_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/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.default.yml b/modules/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.default.yml new file mode 100644 index 0000000..a774ce8 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.default.yml @@ -0,0 +1,51 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.online_course.field_faculty_name + - field.field.node.online_course.field_link_to_cour + - field.field.node.online_course.field_offered_by + - node.type.online_course + module: + - link + - user +id: node.online_course.default +targetEntityType: node +bundle: online_course +mode: default +content: + field_faculty_name: + weight: 102 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_link_to_cour: + weight: 104 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_offered_by: + weight: 103 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.teaser.yml b/modules/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.teaser.yml new file mode 100644 index 0000000..79dc5ec --- /dev/null +++ b/modules/esha/onlinecourse/config/install/core.entity_view_display.node.online_course.teaser.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.online_course.field_faculty_name + - field.field.node.online_course.field_offered_by + - node.type.online_course + module: + - user +id: node.online_course.teaser +targetEntityType: node +bundle: online_course +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_faculty_name: true + field_offered_by: true + langcode: true diff --git a/modules/esha/onlinecourse/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/onlinecourse/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..fb7a35a --- /dev/null +++ b/modules/esha/onlinecourse/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_faculty_name.yml b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_faculty_name.yml new file mode 100644 index 0000000..c5ea1a1 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_faculty_name.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_name + - node.type.fac_page + - node.type.online_course +id: node.online_course.field_faculty_name +field_name: field_faculty_name +entity_type: node +bundle: online_course +label: 'Faculty name' +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/esha/onlinecourse/config/install/field.field.node.online_course.field_link_to_cour.yml b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_link_to_cour.yml new file mode 100644 index 0000000..fddd4ed --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_link_to_cour.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_link_to_cour + - node.type.online_course + module: + - link +id: node.online_course.field_link_to_cour +field_name: field_link_to_cour +entity_type: node +bundle: online_course +label: 'Link to Course' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_offered_by.yml b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_offered_by.yml new file mode 100644 index 0000000..973b204 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.field.node.online_course.field_offered_by.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_offered_by + - node.type.online_course +id: node.online_course.field_offered_by +field_name: field_offered_by +entity_type: node +bundle: online_course +label: 'Offered By' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/esha/onlinecourse/config/install/field.storage.node.field_faculty_name.yml b/modules/esha/onlinecourse/config/install/field.storage.node.field_faculty_name.yml new file mode 100644 index 0000000..d7653f8 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.storage.node.field_faculty_name.yml @@ -0,0 +1,19 @@ +uuid: 7f80e5e4-d5da-49d4-8039-5b54fda033af +langcode: en +status: true +dependencies: + module: + - node +id: node.field_faculty_name +field_name: field_faculty_name +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/esha/onlinecourse/config/install/field.storage.node.field_link_to_cour.yml b/modules/esha/onlinecourse/config/install/field.storage.node.field_link_to_cour.yml new file mode 100644 index 0000000..86d2592 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.storage.node.field_link_to_cour.yml @@ -0,0 +1,19 @@ +uuid: 4e9dd460-14ae-4be0-a820-b3b2f040b0d3 +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_link_to_cour +field_name: field_link_to_cour +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/esha/onlinecourse/config/install/field.storage.node.field_offered_by.yml b/modules/esha/onlinecourse/config/install/field.storage.node.field_offered_by.yml new file mode 100644 index 0000000..6cf5567 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/field.storage.node.field_offered_by.yml @@ -0,0 +1,21 @@ +uuid: cc60ea6e-7263-43dd-bd49-b74ef089a323 +langcode: en +status: true +dependencies: + module: + - node +id: node.field_offered_by +field_name: field_offered_by +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/esha/onlinecourse/config/install/migrate_plus.migration.onlinecourse_sample.yml b/modules/esha/onlinecourse/config/install/migrate_plus.migration.onlinecourse_sample.yml new file mode 100644 index 0000000..8f8ec38 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/migrate_plus.migration.onlinecourse_sample.yml @@ -0,0 +1,36 @@ +uuid: 7ab17b40-597e-411a-a750-23c138da7c6d +id: onlinecourse_sample +label: Courses +migration_group: default +source: + plugin: csv + # Full path to the file. + path: '/var/www/CSV/onlinecourse_sample.csv' + # Column delimiter. Comma (,) by default. + delimiter: ',' + # Field enclosure. Double quotation marks (") by default. + enclosure: '"' + # The number of rows at the beginning which are not data. + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: online_course + title: title + field_link_to_cour: link + field_offered_by: offeredby + field_faculty_name: + - + plugin: explode + delimiter: '|' + source: names + - + plugin: entity_lookup + entity_type: node + bundle: fac_page +destination: + plugin: 'entity:node' + bundle: online_course +migration_dependencies: null diff --git a/modules/esha/onlinecourse/config/install/node.type.fac_page.yml b/modules/esha/onlinecourse/config/install/node.type.fac_page.yml new file mode 100644 index 0000000..47f8ffb --- /dev/null +++ b/modules/esha/onlinecourse/config/install/node.type.fac_page.yml @@ -0,0 +1,23 @@ +uuid: b7471e78-83f0-4359-9512-d4a8f02c2218 +langcode: en +status: true +dependencies: + enforced: + module: + - acadmix_faculty + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +_core: + default_config_hash: yZnGgm-oTEuH3Qz8VcW49f94qFn-pYOYZdrX601an0U +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/esha/onlinecourse/config/install/node.type.online_course.yml b/modules/esha/onlinecourse/config/install/node.type.online_course.yml new file mode 100644 index 0000000..4f492e6 --- /dev/null +++ b/modules/esha/onlinecourse/config/install/node.type.online_course.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Online Course' +type: online_course +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/onlinecourse/onlinecourse.info.yml b/modules/esha/onlinecourse/onlinecourse.info.yml new file mode 100644 index 0000000..91191b6 --- /dev/null +++ b/modules/esha/onlinecourse/onlinecourse.info.yml @@ -0,0 +1,12 @@ +name: 'onlineCourse' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:link + - drupal:path + - drupal:user + - drupal:node + - drupal:menu_ui
\ No newline at end of file diff --git a/modules/esha/onlinecourse/onlinecourse.install b/modules/esha/onlinecourse/onlinecourse.install new file mode 100644 index 0000000..7469bb9 --- /dev/null +++ b/modules/esha/onlinecourse/onlinecourse.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function onlinecourse_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', 'online_course'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/onlinecourse/onlinecourse.module b/modules/esha/onlinecourse/onlinecourse.module new file mode 100644 index 0000000..617de66 --- /dev/null +++ b/modules/esha/onlinecourse/onlinecourse.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains onlinecourse.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function onlinecourse_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the onlinecourse module. + case 'help.page.onlinecourse': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function onlinecourse_theme() { + return [ + 'onlinecourse' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/onlinecourse/templates/onlinecourse.html.twig b/modules/esha/onlinecourse/templates/onlinecourse.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/onlinecourse/templates/onlinecourse.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/onlinecourse/tests/src/Functional/LoadTest.php b/modules/esha/onlinecourse/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..a25c263 --- /dev/null +++ b/modules/esha/onlinecourse/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\onlinecourse\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group onlinecourse + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['onlinecourse']; + + /** + * 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/esha/placements/composer.json b/modules/esha/placements/composer.json new file mode 100644 index 0000000..6900912 --- /dev/null +++ b/modules/esha/placements/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/placements", + "type": "drupal-module", + "description": "Module for Placement Content Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/placements", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/placements", + "source": "http://cgit.drupalcode.org/placements" + }, + "require": { } +} diff --git a/modules/esha/placements/config/install/core.entity_form_display.node.placements.default.yml b/modules/esha/placements/config/install/core.entity_form_display.node.placements.default.yml new file mode 100644 index 0000000..f9aac4a --- /dev/null +++ b/modules/esha/placements/config/install/core.entity_form_display.node.placements.default.yml @@ -0,0 +1,120 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.placements.body + - field.field.node.placements.field_new + - field.field.node.placements.field_placed + - field.field.node.placements.field_total_students_placed + - field.field.node.placements.field_year + - node.type.placements + module: + - path + - text + enforced: + module: + - placements +id: node.placements.default +targetEntityType: node +bundle: placements +mode: default +content: + body: + weight: 125 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_new: + weight: 126 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_placed: + weight: 127 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_total_students_placed: + weight: 123 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_year: + weight: 124 + 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/esha/placements/config/install/core.entity_view_display.node.placements.default.yml b/modules/esha/placements/config/install/core.entity_view_display.node.placements.default.yml new file mode 100644 index 0000000..b6f5b9e --- /dev/null +++ b/modules/esha/placements/config/install/core.entity_view_display.node.placements.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.placements.body + - field.field.node.placements.field_new + - field.field.node.placements.field_placed + - field.field.node.placements.field_total_students_placed + - field.field.node.placements.field_year + - node.type.placements + module: + - text + - user + enforced: + module: + - placements +id: node.placements.default +targetEntityType: node +bundle: placements +mode: default +content: + body: + weight: 105 + label: above + settings: { } + type: text_default + region: content + field_new: + weight: 106 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_placed: + weight: 107 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_total_students_placed: + weight: 103 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_year: + weight: 104 + 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/esha/placements/config/install/core.entity_view_display.node.placements.teaser.yml b/modules/esha/placements/config/install/core.entity_view_display.node.placements.teaser.yml new file mode 100644 index 0000000..6a0abef --- /dev/null +++ b/modules/esha/placements/config/install/core.entity_view_display.node.placements.teaser.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.placements.field_total_students_placed + - field.field.node.placements.field_year + - node.type.placements + module: + - user + enforced: + module: + - placements +id: node.placements.teaser +targetEntityType: node +bundle: placements +mode: teaser +content: + links: + weight: 100 + settings: { } + region: content +hidden: + field_total_students_placed: true + field_year: true + langcode: true diff --git a/modules/esha/placements/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/placements/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..f09eef8 --- /dev/null +++ b/modules/esha/placements/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,15 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - placements +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/placements/config/install/field.field.node.placements.body.yml b/modules/esha/placements/config/install/field.field.node.placements.body.yml new file mode 100644 index 0000000..4eaef94 --- /dev/null +++ b/modules/esha/placements/config/install/field.field.node.placements.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.placements + module: + - text + enforced: + module: + - placements +id: node.placements.body +field_name: body +entity_type: node +bundle: placements +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/esha/placements/config/install/field.field.node.placements.field_new.yml b/modules/esha/placements/config/install/field.field.node.placements.field_new.yml new file mode 100644 index 0000000..4973424 --- /dev/null +++ b/modules/esha/placements/config/install/field.field.node.placements.field_new.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_new + - node.type.placements + - taxonomy.vocabulary.vocab + enforced: + module: + - placements +id: node.placements.field_new +field_name: field_new +entity_type: node +bundle: placements +label: new +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + vocab: vocab + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/esha/placements/config/install/field.field.node.placements.field_placed.yml b/modules/esha/placements/config/install/field.field.node.placements.field_placed.yml new file mode 100644 index 0000000..5a941da --- /dev/null +++ b/modules/esha/placements/config/install/field.field.node.placements.field_placed.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_placed + - node.type.placements + enforced: + module: + - placements +id: node.placements.field_placed +field_name: field_placed +entity_type: node +bundle: placements +label: placed +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/esha/placements/config/install/field.field.node.placements.field_total_students_placed.yml b/modules/esha/placements/config/install/field.field.node.placements.field_total_students_placed.yml new file mode 100644 index 0000000..a5867b7 --- /dev/null +++ b/modules/esha/placements/config/install/field.field.node.placements.field_total_students_placed.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_total_students_placed + - node.type.placements + enforced: + module: + - placements +id: node.placements.field_total_students_placed +field_name: field_total_students_placed +entity_type: node +bundle: placements +label: 'Total Students Placed' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/esha/placements/config/install/field.field.node.placements.field_year.yml b/modules/esha/placements/config/install/field.field.node.placements.field_year.yml new file mode 100644 index 0000000..ef2000d --- /dev/null +++ b/modules/esha/placements/config/install/field.field.node.placements.field_year.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_year + - node.type.placements + - taxonomy.vocabulary.year + enforced: + module: + - placements +id: node.placements.field_year +field_name: field_year +entity_type: node +bundle: placements +label: Year +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + year: year + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: placement_year +field_type: entity_reference diff --git a/modules/esha/placements/config/install/field.storage.node.body.yml b/modules/esha/placements/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..821a97a --- /dev/null +++ b/modules/esha/placements/config/install/field.storage.node.body.yml @@ -0,0 +1,24 @@ +uuid: d15ccb4d-ffc3-42ae-abaa-012960942a15 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - placements +_core: + default_config_hash: EBUo7qOWqaiZaQ_RC9sLY5IoDKphS34v77VIHSACmVY +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/esha/placements/config/install/field.storage.node.field_new.yml b/modules/esha/placements/config/install/field.storage.node.field_new.yml new file mode 100644 index 0000000..117e02e --- /dev/null +++ b/modules/esha/placements/config/install/field.storage.node.field_new.yml @@ -0,0 +1,23 @@ +uuid: f42f851c-6e7b-4843-98ce-f0c233649c4b +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - placements +id: node.field_new +field_name: field_new +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/esha/placements/config/install/field.storage.node.field_placed.yml b/modules/esha/placements/config/install/field.storage.node.field_placed.yml new file mode 100644 index 0000000..d926eeb --- /dev/null +++ b/modules/esha/placements/config/install/field.storage.node.field_placed.yml @@ -0,0 +1,24 @@ +uuid: ad069c50-3ddd-41a5-b5a6-1d930d1aa3df +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - placements +id: node.field_placed +field_name: field_placed +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/esha/placements/config/install/field.storage.node.field_total_students_placed.yml b/modules/esha/placements/config/install/field.storage.node.field_total_students_placed.yml new file mode 100644 index 0000000..010ad2f --- /dev/null +++ b/modules/esha/placements/config/install/field.storage.node.field_total_students_placed.yml @@ -0,0 +1,23 @@ +uuid: 3e89b54e-f405-4dee-b175-10ac5bb61161 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - placements +id: node.field_total_students_placed +field_name: field_total_students_placed +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/esha/placements/config/install/field.storage.node.field_year.yml b/modules/esha/placements/config/install/field.storage.node.field_year.yml new file mode 100644 index 0000000..5b6f903 --- /dev/null +++ b/modules/esha/placements/config/install/field.storage.node.field_year.yml @@ -0,0 +1,23 @@ +uuid: 404051f1-b4e2-4818-b895-e4bf114e7a93 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - placements +id: node.field_year +field_name: field_year +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/esha/placements/config/install/migrate_plus.migration.placements_import1.yml b/modules/esha/placements/config/install/migrate_plus.migration.placements_import1.yml new file mode 100644 index 0000000..42dc7e5 --- /dev/null +++ b/modules/esha/placements/config/install/migrate_plus.migration.placements_import1.yml @@ -0,0 +1,30 @@ +uuid: 1b29566d-9275-46df-a57f-5f6595537753 +id: placements_import +label: Import Placement Data +migration_groups: + - default +source: + plugin: csv + # Full path to the file. + path: '/var/www/CSV/Placements.csv' + # Column delimiter. Comma (,) by default. + delimiter: ',' + # Field enclosure. Double quotation marks (") by default. + enclosure: '"' + # The number of rows at the beginning which are not data. + header_row_count: 1 + keys: + - id +process: + title: title + field_total_students_placed: total + field_year: year + type: + plugin: entity_lookup + entity: taxonomy_term + bundle: placement_year + source: year +destination: + plugin: 'entity:node' + plugin: entity:taxonomy_term +migration_dependencies: null diff --git a/modules/esha/placements/config/install/node.type.placements.yml b/modules/esha/placements/config/install/node.type.placements.yml new file mode 100644 index 0000000..f0bb423 --- /dev/null +++ b/modules/esha/placements/config/install/node.type.placements.yml @@ -0,0 +1,15 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - placements +name: Placements +type: placements +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/placements/config/install/taxonomy.vocabulary.vocab.yml b/modules/esha/placements/config/install/taxonomy.vocabulary.vocab.yml new file mode 100644 index 0000000..5c36cd8 --- /dev/null +++ b/modules/esha/placements/config/install/taxonomy.vocabulary.vocab.yml @@ -0,0 +1,12 @@ +uuid: dfa25a08-cadc-4bc6-826f-b817586af55b +langcode: en +status: true +dependencies: + enforced: + module: + - placements +name: vocab +vid: vocab +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/esha/placements/config/install/taxonomy.vocabulary.year.yml b/modules/esha/placements/config/install/taxonomy.vocabulary.year.yml new file mode 100644 index 0000000..9cf2d82 --- /dev/null +++ b/modules/esha/placements/config/install/taxonomy.vocabulary.year.yml @@ -0,0 +1,12 @@ +uuid: a22778aa-6584-422b-932b-3c4e4f59c1b5 +langcode: en +status: true +dependencies: + enforced: + module: + - placements +name: year +vid: year +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/esha/placements/placements.info.yml b/modules/esha/placements/placements.info.yml new file mode 100644 index 0000000..638f772 --- /dev/null +++ b/modules/esha/placements/placements.info.yml @@ -0,0 +1,13 @@ +name: 'placements' +type: module +description: 'Module for Placement Content Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path diff --git a/modules/esha/placements/placements.install b/modules/esha/placements/placements.install new file mode 100644 index 0000000..6258322 --- /dev/null +++ b/modules/esha/placements/placements.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function placements_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', 'placements'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/placements/placements.module b/modules/esha/placements/placements.module new file mode 100644 index 0000000..20f3371 --- /dev/null +++ b/modules/esha/placements/placements.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains placements.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function placements_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the placements module. + case 'help.page.placements': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Placement Content Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function placements_theme() { + return [ + 'placements' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/placements/placements.routing.yml b/modules/esha/placements/placements.routing.yml new file mode 100644 index 0000000..1872ef8 --- /dev/null +++ b/modules/esha/placements/placements.routing.yml @@ -0,0 +1,8 @@ + +placements.placement_controller_hello: + path: '/placements/hello/{name}' + defaults: + _controller: '\Drupal\placements\Controller\PlacementController::hello' + _title: 'placed' + requirements: + _permission: 'access content' diff --git a/modules/esha/placements/src/Controller/PlacementController.php b/modules/esha/placements/src/Controller/PlacementController.php new file mode 100644 index 0000000..761db6a --- /dev/null +++ b/modules/esha/placements/src/Controller/PlacementController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\placements\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class PlacementController. + */ +class PlacementController 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/esha/placements/templates/placements.html.twig b/modules/esha/placements/templates/placements.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/placements/templates/placements.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/placements/tests/src/Functional/LoadTest.php b/modules/esha/placements/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..fd19fb6 --- /dev/null +++ b/modules/esha/placements/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\placements\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group placements + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['placements']; + + /** + * 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/esha/programs/composer.json b/modules/esha/programs/composer.json new file mode 100644 index 0000000..9889ab7 --- /dev/null +++ b/modules/esha/programs/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/programs", + "type": "drupal-module", + "description": "Module for Content Type Programs Offered", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/programs", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/programs", + "source": "http://cgit.drupalcode.org/programs" + }, + "require": { } +} diff --git a/modules/esha/programs/config/install/core.entity_form_display.node.p.default.yml b/modules/esha/programs/config/install/core.entity_form_display.node.p.default.yml new file mode 100644 index 0000000..a01057d --- /dev/null +++ b/modules/esha/programs/config/install/core.entity_form_display.node.p.default.yml @@ -0,0 +1,124 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.p.body + - field.field.node.p.field_courseware + - field.field.node.p.field_curriculum + - field.field.node.p.field_degree + - field.field.node.p.field_lesson_plan + - field.field.node.p.field_objectives + - node.type.p + module: + - file + - path + - text +id: node.p.default +targetEntityType: node +bundle: p +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_courseware: + weight: 128 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_curriculum: + weight: 123 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_degree: + weight: 125 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_lesson_plan: + weight: 129 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + field_objectives: + weight: 127 + 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/esha/programs/config/install/core.entity_view_display.node.p.default.yml b/modules/esha/programs/config/install/core.entity_view_display.node.p.default.yml new file mode 100644 index 0000000..3c58d93 --- /dev/null +++ b/modules/esha/programs/config/install/core.entity_view_display.node.p.default.yml @@ -0,0 +1,74 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.p.body + - field.field.node.p.field_courseware + - field.field.node.p.field_curriculum + - field.field.node.p.field_degree + - field.field.node.p.field_lesson_plan + - field.field.node.p.field_objectives + - node.type.p + module: + - file + - text + - user +id: node.p.default +targetEntityType: node +bundle: p +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_courseware: + weight: 108 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_curriculum: + weight: 103 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_degree: + weight: 105 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_lesson_plan: + weight: 109 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + field_objectives: + weight: 107 + 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/esha/programs/config/install/core.entity_view_display.node.p.teaser.yml b/modules/esha/programs/config/install/core.entity_view_display.node.p.teaser.yml new file mode 100644 index 0000000..0b08722 --- /dev/null +++ b/modules/esha/programs/config/install/core.entity_view_display.node.p.teaser.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.p.body + - node.type.p + module: + - text + - user +id: node.p.teaser +targetEntityType: node +bundle: p +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/esha/programs/config/install/field.field.node.p.body.yml b/modules/esha/programs/config/install/field.field.node.p.body.yml new file mode 100644 index 0000000..9e25420 --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.body.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.p + module: + - text +id: node.p.body +field_name: body +entity_type: node +bundle: p +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/esha/programs/config/install/field.field.node.p.field_courseware.yml b/modules/esha/programs/config/install/field.field.node.p.field_courseware.yml new file mode 100644 index 0000000..4e4b22c --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.field_courseware.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_courseware + - node.type.p + module: + - file +id: node.p.field_courseware +field_name: field_courseware +entity_type: node +bundle: p +label: Courseware +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: pdf + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/esha/programs/config/install/field.field.node.p.field_curriculum.yml b/modules/esha/programs/config/install/field.field.node.p.field_curriculum.yml new file mode 100644 index 0000000..f782e17 --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.field_curriculum.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_curriculum + - node.type.p + module: + - file +id: node.p.field_curriculum +field_name: field_curriculum +entity_type: node +bundle: p +label: Curriculum +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: pdf + max_filesize: '12 MB' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/esha/programs/config/install/field.field.node.p.field_degree.yml b/modules/esha/programs/config/install/field.field.node.p.field_degree.yml new file mode 100644 index 0000000..06ff5f0 --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.field_degree.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_degree + - node.type.p + - taxonomy.vocabulary.offered_programs +id: node.p.field_degree +field_name: field_degree +entity_type: node +bundle: p +label: Degree +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + offered_programs: offered_programs + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/esha/programs/config/install/field.field.node.p.field_lesson_plan.yml b/modules/esha/programs/config/install/field.field.node.p.field_lesson_plan.yml new file mode 100644 index 0000000..29229ab --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.field_lesson_plan.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_lesson_plan + - node.type.p + module: + - file +id: node.p.field_lesson_plan +field_name: field_lesson_plan +entity_type: node +bundle: p +label: 'Lesson Plan' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: pdf + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/esha/programs/config/install/field.field.node.p.field_objectives.yml b/modules/esha/programs/config/install/field.field.node.p.field_objectives.yml new file mode 100644 index 0000000..fe10a5b --- /dev/null +++ b/modules/esha/programs/config/install/field.field.node.p.field_objectives.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_objectives + - node.type.p + module: + - file +id: node.p.field_objectives +field_name: field_objectives +entity_type: node +bundle: p +label: Objectives +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: pdf + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/esha/programs/config/install/field.storage.node.field_courseware.yml b/modules/esha/programs/config/install/field.storage.node.field_courseware.yml new file mode 100644 index 0000000..ce75fe2 --- /dev/null +++ b/modules/esha/programs/config/install/field.storage.node.field_courseware.yml @@ -0,0 +1,23 @@ +uuid: 4f345cc8-3a42-45bc-8224-5e33536cd339 +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_courseware +field_name: field_courseware +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/esha/programs/config/install/field.storage.node.field_curriculum.yml b/modules/esha/programs/config/install/field.storage.node.field_curriculum.yml new file mode 100644 index 0000000..50b7f5b --- /dev/null +++ b/modules/esha/programs/config/install/field.storage.node.field_curriculum.yml @@ -0,0 +1,23 @@ +uuid: 37ea26ab-f120-4e68-9a51-af20519bb867 +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_curriculum +field_name: field_curriculum +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/esha/programs/config/install/field.storage.node.field_degree.yml b/modules/esha/programs/config/install/field.storage.node.field_degree.yml new file mode 100644 index 0000000..a3c9c4c --- /dev/null +++ b/modules/esha/programs/config/install/field.storage.node.field_degree.yml @@ -0,0 +1,20 @@ +uuid: 17870542-92b4-4097-9fd7-2ff5e2aedfcf +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: node.field_degree +field_name: field_degree +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/esha/programs/config/install/field.storage.node.field_lesson_plan.yml b/modules/esha/programs/config/install/field.storage.node.field_lesson_plan.yml new file mode 100644 index 0000000..45dabec --- /dev/null +++ b/modules/esha/programs/config/install/field.storage.node.field_lesson_plan.yml @@ -0,0 +1,23 @@ +uuid: bb5ebaad-6106-4cce-abcf-7ed7fff8c220 +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_lesson_plan +field_name: field_lesson_plan +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/esha/programs/config/install/field.storage.node.field_objectives.yml b/modules/esha/programs/config/install/field.storage.node.field_objectives.yml new file mode 100644 index 0000000..f6c5857 --- /dev/null +++ b/modules/esha/programs/config/install/field.storage.node.field_objectives.yml @@ -0,0 +1,23 @@ +uuid: c65123d9-9165-4ecf-8d9d-86085fee2bcd +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_objectives +field_name: field_objectives +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/esha/programs/config/install/node.type.p.yml b/modules/esha/programs/config/install/node.type.p.yml new file mode 100644 index 0000000..7978d3f --- /dev/null +++ b/modules/esha/programs/config/install/node.type.p.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Programs Offered' +type: p +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/programs/config/install/programs_offered.yaml b/modules/esha/programs/config/install/programs_offered.yaml new file mode 100644 index 0000000..1bd7001 --- /dev/null +++ b/modules/esha/programs/config/install/programs_offered.yaml @@ -0,0 +1,110 @@ +id: programs_offered +label: 'Programs Offered Import' +migration_group: default +source: + plugin: csv + path: '/var/www/CSV/programs_offered.csv' + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/programsoffered + file_dest1: 'public://programs_offered_courseware/' + file_dest2: 'public://programs_offered_lessonplan/' + file_dest3: 'public://programs_offered_curriculum/' + file_dest4: 'public://programs_offered_objectives/' +process: + type: + plugin: default_value + default_value: p + source_path1: + - + plugin: skip_on_empty + method: process + source: courseware + - + plugin: concat + delimiter: / + source: + - constants/file_source + - courseware + source_path2: + - + plugin: skip_on_empty + method: process + source: lessonplan + - + plugin: concat + delimiter: / + source: + - constants/file_source + - lessonplan + source_path3: + - + plugin: skip_on_empty + method: process + source: curriculum + - + plugin: concat + delimiter: / + source: + - constants/file_source + - curriculum + source_path4: + - + plugin: skip_on_empty + method: process + source: objectives + - + plugin: concat + delimiter: / + source: + - constants/file_source + - objectives + title: title + body/value: body + body/format: + - + plugin: default_value + default_value: basic_html + field_course_description: descr + field_courseware: + - + plugin: explode + delimiter: '|' + source: courseware + - + plugin: file_import + source: '@source_path1' + destination: constants/file_dest1 + field_lesson_plan: + - + plugin: explode + delimiter: '|' + source: lessonplan + - + plugin: file_import + source: '@source_path2' + destination: constants/file_dest2 + field_curriculum: + plugin: file_import + source: '@source_path3' + destination: constants/file_dest3 + field_objectives: + plugin: file_import + source: '@source_path4' + destination: constants/file_dest4 + field_degree: + plugin: entity_lookup + entity: taxonomy_term + bundle: offered_programs + source: programtype +destination: + plugin: 'entity:node' + plugin: 'entity:taxonomy_term' + bundle: p +migration_dependencies: + required: { } + optional: { } diff --git a/modules/esha/programs/config/install/taxonomy.vocabulary.offered_programs.yml b/modules/esha/programs/config/install/taxonomy.vocabulary.offered_programs.yml new file mode 100644 index 0000000..dfbc3c1 --- /dev/null +++ b/modules/esha/programs/config/install/taxonomy.vocabulary.offered_programs.yml @@ -0,0 +1,9 @@ +uuid: f55c9d15-5ce8-4e66-9682-df8d98bd0382 +langcode: en +status: true +dependencies: { } +name: 'Offered Programs' +vid: offered_programs +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/esha/programs/programs.info.yml b/modules/esha/programs/programs.info.yml new file mode 100644 index 0000000..284cbaa --- /dev/null +++ b/modules/esha/programs/programs.info.yml @@ -0,0 +1,13 @@ +name: 'programs' +type: module +description: 'Module for Content Type Programs Offered' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:text + - drupal:user + - drupal:path + - drupal:node + - drupal:taxonomy + - drupal:menu_ui diff --git a/modules/esha/programs/programs.install b/modules/esha/programs/programs.install new file mode 100644 index 0000000..404bcba --- /dev/null +++ b/modules/esha/programs/programs.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function programs_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', 'p'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/programs/programs.module b/modules/esha/programs/programs.module new file mode 100644 index 0000000..4909c34 --- /dev/null +++ b/modules/esha/programs/programs.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains programs.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function programs_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the programs module. + case 'help.page.programs': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Content Type Programs Offered') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function programs_theme() { + return [ + 'programs' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/programs/programs.routing.yml b/modules/esha/programs/programs.routing.yml new file mode 100644 index 0000000..240db1e --- /dev/null +++ b/modules/esha/programs/programs.routing.yml @@ -0,0 +1,8 @@ + +programs.programs_offered_controller_hello: + path: '/programs/hello/{name}' + defaults: + _controller: '\Drupal\programs\Controller\ProgramsOfferedController::hello' + _title: 'control' + requirements: + _permission: 'access content' diff --git a/modules/esha/programs/src/Controller/ProgramsOfferedController.php b/modules/esha/programs/src/Controller/ProgramsOfferedController.php new file mode 100644 index 0000000..7fe6888 --- /dev/null +++ b/modules/esha/programs/src/Controller/ProgramsOfferedController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\programs\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class ProgramsOfferedController. + */ +class ProgramsOfferedController 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/esha/programs/templates/programs.html.twig b/modules/esha/programs/templates/programs.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/programs/templates/programs.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/programs/tests/src/Functional/LoadTest.php b/modules/esha/programs/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..8d3d7ab --- /dev/null +++ b/modules/esha/programs/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\programs\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group programs + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['programs']; + + /** + * 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/esha/sig/composer.json b/modules/esha/sig/composer.json new file mode 100644 index 0000000..92be454 --- /dev/null +++ b/modules/esha/sig/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/sig", + "type": "drupal-module", + "description": "Module for Special Interest Groups Content Type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/sig", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/sig", + "source": "http://cgit.drupalcode.org/sig" + }, + "require": { } +} diff --git a/modules/esha/sig/config/install/core.entity_form_display.node.special_interest_groups.default.yml b/modules/esha/sig/config/install/core.entity_form_display.node.special_interest_groups.default.yml new file mode 100644 index 0000000..2a56e47 --- /dev/null +++ b/modules/esha/sig/config/install/core.entity_form_display.node.special_interest_groups.default.yml @@ -0,0 +1,93 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.special_interest_groups.field_faculty_head + - field.field.node.special_interest_groups.field_sig_members + - node.type.special_interest_groups + module: + - path + enforced: + module: + - sig +id: node.special_interest_groups.default +targetEntityType: node +bundle: special_interest_groups +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_faculty_head: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_sig_members: + 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/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.default.yml b/modules/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.default.yml new file mode 100644 index 0000000..41cd888 --- /dev/null +++ b/modules/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.default.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.special_interest_groups.field_faculty_head + - field.field.node.special_interest_groups.field_sig_members + - node.type.special_interest_groups + module: + - user + enforced: + module: + - sig +id: node.special_interest_groups.default +targetEntityType: node +bundle: special_interest_groups +mode: default +content: + field_faculty_head: + weight: 102 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_sig_members: + 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/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.teaser.yml b/modules/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.teaser.yml new file mode 100644 index 0000000..01fe2d5 --- /dev/null +++ b/modules/esha/sig/config/install/core.entity_view_display.node.special_interest_groups.teaser.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.special_interest_groups.field_faculty_head + - node.type.special_interest_groups + module: + - user + enforced: + module: + - sig +id: node.special_interest_groups.teaser +targetEntityType: node +bundle: special_interest_groups +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_faculty_head: true + langcode: true diff --git a/modules/esha/sig/config/install/core.entity_view_mode.node.teaser.yml b/modules/esha/sig/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..138bd3c --- /dev/null +++ b/modules/esha/sig/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,15 @@ +uuid: eae4e8eb-df75-49ff-b350-c4bd59679b36 +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - sig +_core: + default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4 +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/esha/sig/config/install/field.field.node.special_interest_groups.field_faculty_head.yml b/modules/esha/sig/config/install/field.field.node.special_interest_groups.field_faculty_head.yml new file mode 100644 index 0000000..866afa7 --- /dev/null +++ b/modules/esha/sig/config/install/field.field.node.special_interest_groups.field_faculty_head.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_faculty_head + - node.type.fac_page + - node.type.special_interest_groups + enforced: + module: + - sig +id: node.special_interest_groups.field_faculty_head +field_name: field_faculty_head +entity_type: node +bundle: special_interest_groups +label: 'Faculty Head' +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/esha/sig/config/install/field.field.node.special_interest_groups.field_sig_members.yml b/modules/esha/sig/config/install/field.field.node.special_interest_groups.field_sig_members.yml new file mode 100644 index 0000000..8b199d9 --- /dev/null +++ b/modules/esha/sig/config/install/field.field.node.special_interest_groups.field_sig_members.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_sig_members + - node.type.fac_page + - node.type.special_interest_groups + enforced: + module: + - sig +id: node.special_interest_groups.field_sig_members +field_name: field_sig_members +entity_type: node +bundle: special_interest_groups +label: 'SIG Members' +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/esha/sig/config/install/field.storage.node.field_faculty_head.yml b/modules/esha/sig/config/install/field.storage.node.field_faculty_head.yml new file mode 100644 index 0000000..bd37713 --- /dev/null +++ b/modules/esha/sig/config/install/field.storage.node.field_faculty_head.yml @@ -0,0 +1,22 @@ +uuid: c30dd806-cceb-4e4a-94f5-cc06173cf69a +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - sig +id: node.field_faculty_head +field_name: field_faculty_head +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/esha/sig/config/install/field.storage.node.field_sig_members.yml b/modules/esha/sig/config/install/field.storage.node.field_sig_members.yml new file mode 100644 index 0000000..8346ae7 --- /dev/null +++ b/modules/esha/sig/config/install/field.storage.node.field_sig_members.yml @@ -0,0 +1,22 @@ +uuid: 0d465dd6-6376-449e-b185-1e75febf6c2f +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - sig +id: node.field_sig_members +field_name: field_sig_members +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/esha/sig/config/install/migrate_plus.migration.sig_sample.yml b/modules/esha/sig/config/install/migrate_plus.migration.sig_sample.yml new file mode 100644 index 0000000..d309984 --- /dev/null +++ b/modules/esha/sig/config/install/migrate_plus.migration.sig_sample.yml @@ -0,0 +1,40 @@ +uuid: 9dea4ec4-fb79-4a5f-a37a-a045de069432 +id: sig_sample +label: 'SIG Sample' +migration_group: default +source: + plugin: csv + # Full path to the file. + path: '/var/www/CSV/sig_sample.csv' + # Column delimiter. Comma (,) by default. + delimiter: ',' + # Field enclosure. Double quotation marks (") by default. + enclosure: '"' + # The number of rows at the beginning which are not data. + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: special_interest_groups + title: title + field_faculty_head: + - + plugin: entity_lookup + entity_type: node + bundle: fac_page + source: head + field_sig_members: + - + plugin: explode + delimiter: '|' + source: members + - + plugin: entity_lookup + entity_type: node + bundle: fac_page +destination: + plugin: 'entity:node' + bundle: special_interest_groups +migration_dependencies: null diff --git a/modules/esha/sig/config/install/node.type.fac_page.yml b/modules/esha/sig/config/install/node.type.fac_page.yml new file mode 100644 index 0000000..5fd2e1e --- /dev/null +++ b/modules/esha/sig/config/install/node.type.fac_page.yml @@ -0,0 +1,26 @@ +uuid: b7471e78-83f0-4359-9512-d4a8f02c2218 +langcode: en +status: true +dependencies: + enforced: + module: + - acadmix_faculty + module: + - menu_ui + enforced: + module: + - sig +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +_core: + default_config_hash: yZnGgm-oTEuH3Qz8VcW49f94qFn-pYOYZdrX601an0U +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/esha/sig/config/install/node.type.special_interest_groups.yml b/modules/esha/sig/config/install/node.type.special_interest_groups.yml new file mode 100644 index 0000000..7a413fb --- /dev/null +++ b/modules/esha/sig/config/install/node.type.special_interest_groups.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - sig +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Special Interest Groups' +type: special_interest_groups +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/esha/sig/sig.info.yml b/modules/esha/sig/sig.info.yml new file mode 100644 index 0000000..94c6b38 --- /dev/null +++ b/modules/esha/sig/sig.info.yml @@ -0,0 +1,10 @@ +name: 'sig' +type: module +description: 'Module for Special Interest Groups Content Type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:path + - drupal:node + - drupal:user + - drupal:menu_ui diff --git a/modules/esha/sig/sig.install b/modules/esha/sig/sig.install new file mode 100644 index 0000000..b032a5b --- /dev/null +++ b/modules/esha/sig/sig.install @@ -0,0 +1,22 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function sig_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', 'special_interest_groups'); + $nids = $query->execute(); + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/esha/sig/sig.module b/modules/esha/sig/sig.module new file mode 100644 index 0000000..72809bb --- /dev/null +++ b/modules/esha/sig/sig.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains sig.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function sig_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the sig module. + case 'help.page.sig': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Module for Special Interest Groups Content Type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function sig_theme() { + return [ + 'sig' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/esha/sig/templates/sig.html.twig b/modules/esha/sig/templates/sig.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/esha/sig/templates/sig.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/esha/sig/tests/src/Functional/LoadTest.php b/modules/esha/sig/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..8b87e58 --- /dev/null +++ b/modules/esha/sig/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\sig\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group sig + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['sig']; + + /** + * 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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); + } + +} diff --git a/modules/mansimran/administrative_offices/administrative_offices.info.yml b/modules/mansimran/administrative_offices/administrative_offices.info.yml new file mode 100644 index 0000000..6ecbeec --- /dev/null +++ b/modules/mansimran/administrative_offices/administrative_offices.info.yml @@ -0,0 +1,14 @@ +name: 'administrative offices' +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/administrative_offices.install b/modules/mansimran/administrative_offices/administrative_offices.install new file mode 100644 index 0000000..7985f05 --- /dev/null +++ b/modules/mansimran/administrative_offices/administrative_offices.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function administrative_offices_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', 'administrative_offices'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/administrative_offices/administrative_offices.module b/modules/mansimran/administrative_offices/administrative_offices.module new file mode 100644 index 0000000..125d9da --- /dev/null +++ b/modules/mansimran/administrative_offices/administrative_offices.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains administrative_offices.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function administrative_offices_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the administrative_offices module. + case 'help.page.administrative_offices': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Administrative offices content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function administrative_offices_theme() { + return [ + 'administrative_offices' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/administrative_offices/composer.json b/modules/mansimran/administrative_offices/composer.json new file mode 100644 index 0000000..cb21bd1 --- /dev/null +++ b/modules/mansimran/administrative_offices/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/administrative_offices", + "type": "drupal-module", + "description": "Administrative offices content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/administrative_offices", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/administrative_offices", + "source": "http://cgit.drupalcode.org/administrative_offices" + }, + "require": { } +} 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 new file mode 100644 index 0000000..22f494c --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml @@ -0,0 +1,98 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.administrative_offices.body + - field.field.node.administrative_offices.field_office_ + - node.type.administrative_offices + module: + - paragraphs + - path + - text + enforced: + module: + - administrative_offices +id: node.administrative_offices.default +targetEntityType: node +bundle: administrative_offices +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_office_: + type: entity_reference_paragraphs + weight: 124 + 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/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.default.yml b/modules/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.default.yml new file mode 100644 index 0000000..e042f07 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.default.yml @@ -0,0 +1,42 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.administrative_offices.body + - field.field.node.administrative_offices.field_office_ + - node.type.administrative_offices + module: + - entity_reference_revisions + - text + - user + enforced: + module: + - administrative_offices +id: node.administrative_offices.default +targetEntityType: node +bundle: administrative_offices +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_office_: + type: entity_reference_revisions_entity_view + weight: 104 + label: above + settings: + view_mode: default + link: '' + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.teaser.yml b/modules/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.teaser.yml new file mode 100644 index 0000000..5057835 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/core.entity_view_display.node.administrative_offices.teaser.yml @@ -0,0 +1,35 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.administrative_offices.body + - field.field.node.administrative_offices.field_office_ + - node.type.administrative_offices + module: + - text + - user + enforced: + module: + - administrative_offices +id: node.administrative_offices.teaser +targetEntityType: node +bundle: administrative_offices +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_office_: true + langcode: true diff --git a/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.body.yml b/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.body.yml new file mode 100644 index 0000000..f2a9a26 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.administrative_offices + module: + - text + enforced: + module: + - administrative_offices +id: node.administrative_offices.body +field_name: body +entity_type: node +bundle: administrative_offices +label: Body +description: 'Description of the office' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.field_office_.yml b/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.field_office_.yml new file mode 100644 index 0000000..0c10400 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/field.field.node.administrative_offices.field_office_.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_office_ + - node.type.administrative_offices + - paragraphs.paragraphs_type.office_details + module: + - entity_reference_revisions + enforced: + module: + - administrative_offices +id: node.administrative_offices.field_office_ +field_name: field_office_ +entity_type: node +bundle: administrative_offices +label: 'Office details' +description: 'Office details' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + office_details: office_details + target_bundles_drag_drop: + member_details_field: + weight: 4 + enabled: false + office_details: + enabled: true + weight: 5 + r_d_projects: + weight: 6 + enabled: false +field_type: entity_reference_revisions diff --git a/modules/mansimran/administrative_offices/config/install/field.storage.node.field_office_.yml b/modules/mansimran/administrative_offices/config/install/field.storage.node.field_office_.yml new file mode 100644 index 0000000..9622dfa --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/field.storage.node.field_office_.yml @@ -0,0 +1,24 @@ +uuid: a459bc3a-894d-4393-955a-85ecd45061f4 +langcode: en +status: true +dependencies: + module: + - entity_reference_revisions + - node + - paragraphs + enforced: + module: + - administrative_offices +id: node.field_office_ +field_name: field_office_ +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/administrative_offices/config/install/migrate_plus.migration.admin_para_migration.yml b/modules/mansimran/administrative_offices/config/install/migrate_plus.migration.admin_para_migration.yml new file mode 100644 index 0000000..143e1b5 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/migrate_plus.migration.admin_para_migration.yml @@ -0,0 +1,30 @@ +uuid: b750a99d-9cc8-4c43-9fce-5e75fd128bf8 +langcode: en +status: true +id: admin_para_migration +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'admin content migration' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/adminofficepara.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: office_details + field_contact_details: Contact + field_location: location +destination: + plugin: entity_reference_revisions:paragraph +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/administrative_offices/config/install/migrate_plus.migration.adminoffice_1.yml b/modules/mansimran/administrative_offices/config/install/migrate_plus.migration.adminoffice_1.yml new file mode 100644 index 0000000..8ace16e --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/migrate_plus.migration.adminoffice_1.yml @@ -0,0 +1,57 @@ +uuid: 99d55013-7c47-4b21-9368-572622fd85df +langcode: en +status: true +id: adminoffice_1 +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'admin_office_csv_import_1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/adminofficenode.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: administrative_offices + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_office_/target_id: + - + plugin: migration_lookup + migration: admin_para_migration + allow_multiple: true + source: id + no_stub: true + - + plugin: extract + index: + - 0 + field_office_/target_revision_id: + - + plugin: migration_lookup + migration: admin_para_migration + allow_multiple: true + source: id + no_stub: true + - + plugin: extract + index: + - 1 +destination: + plugin: 'entity:node' + bundle: administrative_offices +migration_dependencies: + required: + - admin_para_migration + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/administrative_offices/config/install/node.type.administrative_offices.yml b/modules/mansimran/administrative_offices/config/install/node.type.administrative_offices.yml new file mode 100644 index 0000000..95d8940 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/node.type.administrative_offices.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - administrative_offices +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Administrative offices' +type: administrative_offices +description: 'List of administrative offices in VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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 new file mode 100644 index 0000000..06c2b9a --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml @@ -0,0 +1,16 @@ +uuid: af03fad4-b366-424d-bd9e-71b303a68ff3 +langcode: en +status: true +dependencies: + enforced: + module: + - administrative_offices +id: office_details +label: 'Office details' +icon_uuid: null +description: '' +behavior_plugins: { } +dependecies: + enforced: + module: + - administrative_offices 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/administrative_offices/templates/administrative-offices.html.twig b/modules/mansimran/administrative_offices/templates/administrative-offices.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/administrative_offices/templates/administrative-offices.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/administrative_offices/tests/src/Functional/LoadTest.php b/modules/mansimran/administrative_offices/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..2610ff5 --- /dev/null +++ b/modules/mansimran/administrative_offices/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\administrative_offices\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group administrative_offices + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['administrative_offices']; + + /** + * 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/chapters/chapters.info.yml b/modules/mansimran/chapters/chapters.info.yml new file mode 100644 index 0000000..8502c2e --- /dev/null +++ b/modules/mansimran/chapters/chapters.info.yml @@ -0,0 +1,16 @@ +name: 'chapters' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:menu_ui + - drupal:file + - drupal:image + - drupal:link + - drupal:taxonomy + - drupal:path + - drupal:text + - drupal:user + 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/chapters.module b/modules/mansimran/chapters/chapters.module new file mode 100644 index 0000000..9d6c121 --- /dev/null +++ b/modules/mansimran/chapters/chapters.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains chapters.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function chapters_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the chapters module. + case 'help.page.chapters': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function chapters_theme() { + return [ + 'chapters' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/chapters/chapters.routing.yml b/modules/mansimran/chapters/chapters.routing.yml new file mode 100644 index 0000000..4f87132 --- /dev/null +++ b/modules/mansimran/chapters/chapters.routing.yml @@ -0,0 +1,8 @@ + +chapters.chapters_controller_hello: + path: '/chapters/hello/{name}' + defaults: + _controller: '\Drupal\chapters\Controller\chaptersController::hello' + _title: 'chaptersController' + requirements: + _permission: 'access content' diff --git a/modules/mansimran/chapters/composer.json b/modules/mansimran/chapters/composer.json new file mode 100644 index 0000000..02f466f --- /dev/null +++ b/modules/mansimran/chapters/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/chapters", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/chapters", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/chapters", + "source": "http://cgit.drupalcode.org/chapters" + }, + "require": { } +} diff --git a/modules/mansimran/chapters/config/install/core.entity_form_display.node.student_chapter.default.yml b/modules/mansimran/chapters/config/install/core.entity_form_display.node.student_chapter.default.yml new file mode 100644 index 0000000..a58312d --- /dev/null +++ b/modules/mansimran/chapters/config/install/core.entity_form_display.node.student_chapter.default.yml @@ -0,0 +1,115 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.student_chapter.body + - field.field.node.student_chapter.field_chapter_category + - field.field.node.student_chapter.field_chapter_facebook_link + - field.field.node.student_chapter.field_chapter_logo + - image.style.thumbnail + - node.type.student_chapter + module: + - image + - link + - path + - text + enforced: + module: + - chapters +id: node.student_chapter.default +targetEntityType: node +bundle: student_chapter +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_chapter_category: + weight: 125 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_chapter_facebook_link: + weight: 122 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_chapter_logo: + weight: 123 + 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/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.default.yml b/modules/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.default.yml new file mode 100644 index 0000000..40b8ba2 --- /dev/null +++ b/modules/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.default.yml @@ -0,0 +1,65 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.student_chapter.body + - field.field.node.student_chapter.field_chapter_category + - field.field.node.student_chapter.field_chapter_facebook_link + - field.field.node.student_chapter.field_chapter_logo + - node.type.student_chapter + module: + - image + - link + - text + - user + enforced: + module: + - chapters +id: node.student_chapter.default +targetEntityType: node +bundle: student_chapter +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_chapter_category: + weight: 105 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_chapter_facebook_link: + weight: 103 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_chapter_logo: + weight: 102 + label: above + 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/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.teaser.yml b/modules/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.teaser.yml new file mode 100644 index 0000000..fc1b662 --- /dev/null +++ b/modules/mansimran/chapters/config/install/core.entity_view_display.node.student_chapter.teaser.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.student_chapter.body + - field.field.node.student_chapter.field_chapter_category + - field.field.node.student_chapter.field_chapter_facebook_link + - field.field.node.student_chapter.field_chapter_logo + - node.type.student_chapter + module: + - text + - user + enforced: + module: + - chapters +id: node.student_chapter.teaser +targetEntityType: node +bundle: student_chapter +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_chapter_category: true + field_chapter_facebook_link: true + field_chapter_logo: true + langcode: true diff --git a/modules/mansimran/chapters/config/install/field.field.node.student_chapter.body.yml b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.body.yml new file mode 100644 index 0000000..06c5cb1 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.student_chapter + module: + - text + enforced: + module: + - chapters +id: node.student_chapter.body +field_name: body +entity_type: node +bundle: student_chapter +label: Body +description: 'Description of various chapters in VIT' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_category.yml b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_category.yml new file mode 100644 index 0000000..724f975 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_category.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_chapter_category + - node.type.student_chapter + - taxonomy.vocabulary.chapter_category + enforced: + module: + - chapters +id: node.student_chapter.field_chapter_category +field_name: field_chapter_category +entity_type: node +bundle: student_chapter +label: 'chapter category' +description: 'chapter category' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + chapter_category: chapter_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_facebook_link.yml b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_facebook_link.yml new file mode 100644 index 0000000..7b40ea8 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_facebook_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_chapter_facebook_link + - node.type.student_chapter + module: + - link + enforced: + module: + - chapters +id: node.student_chapter.field_chapter_facebook_link +field_name: field_chapter_facebook_link +entity_type: node +bundle: student_chapter +label: 'Chapter Facebook Link' +description: 'Chapter Facebook Link' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_logo.yml b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_logo.yml new file mode 100644 index 0000000..000acc8 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.field.node.student_chapter.field_chapter_logo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_chapter_logo + - node.type.student_chapter + module: + - image + enforced: + module: + - chapters +id: node.student_chapter.field_chapter_logo +field_name: field_chapter_logo +entity_type: node +bundle: student_chapter +label: 'chapter logo' +description: 'chapter logo' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: chapters + 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/mansimran/chapters/config/install/field.storage.node.field_chapter_category.yml b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_category.yml new file mode 100644 index 0000000..47660d5 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_category.yml @@ -0,0 +1,23 @@ +uuid: d8af11ea-283d-4e9c-9e76-abbfeafbb339 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - chapters +id: node.field_chapter_category +field_name: field_chapter_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/mansimran/chapters/config/install/field.storage.node.field_chapter_facebook_link.yml b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_facebook_link.yml new file mode 100644 index 0000000..84d5ed6 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_facebook_link.yml @@ -0,0 +1,22 @@ +uuid: f93b9a5d-516b-441c-a733-cf091824d0e6 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - chapters +id: node.field_chapter_facebook_link +field_name: field_chapter_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/mansimran/chapters/config/install/field.storage.node.field_chapter_logo.yml b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_logo.yml new file mode 100644 index 0000000..e949317 --- /dev/null +++ b/modules/mansimran/chapters/config/install/field.storage.node.field_chapter_logo.yml @@ -0,0 +1,33 @@ +uuid: 84d48b0a-5d4a-439e-a308-8c3b2eb9cd4a +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - chapters +id: node.field_chapter_logo +field_name: field_chapter_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/mansimran/chapters/config/install/migrate_plus.migration.chapters_1.yml b/modules/mansimran/chapters/config/install/migrate_plus.migration.chapters_1.yml new file mode 100644 index 0000000..6b70fa9 --- /dev/null +++ b/modules/mansimran/chapters/config/install/migrate_plus.migration.chapters_1.yml @@ -0,0 +1,58 @@ +uuid: 9cfc3d24-5f29-4a18-9ab1-c0b86b9e8728 +langcode: en +id: chapters_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'chapters_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/chapters.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/chapters + file_dest: 'public://chapters/' +process: + type: + plugin: default_value + default_value: student_chapter + source_path: + - + plugin: skip_on_empty + method: process + source: chapter_logo + - + plugin: concat + delimiter: / + source: + - constants/file_source + - chapter_logo + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_chapter_category: + plugin: entity_lookup + entity_type: taxonomy_term + bundle: chapter_category + source: chapter_category + field_chapter_logo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_chapter_facebook_link/uri: chapter_facebook_link +destination: + plugin: 'entity:node' + bundle: student_chapter +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/chapters/config/install/node.type.student_chapter.yml b/modules/mansimran/chapters/config/install/node.type.student_chapter.yml new file mode 100644 index 0000000..51f8c08 --- /dev/null +++ b/modules/mansimran/chapters/config/install/node.type.student_chapter.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - chapters +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Student Chapters' +type: student_chapter +description: 'List of student chapters in VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/mansimran/chapters/config/install/taxonomy.vocabulary.chapter_category.yml b/modules/mansimran/chapters/config/install/taxonomy.vocabulary.chapter_category.yml new file mode 100644 index 0000000..a357ac9 --- /dev/null +++ b/modules/mansimran/chapters/config/install/taxonomy.vocabulary.chapter_category.yml @@ -0,0 +1,12 @@ +uuid: 8dfa8ec9-056f-423c-8c93-abfc232735c3 +langcode: en +status: true +dependencies: + enforced: + module: + - chapters +name: 'Chapter category' +vid: chapter_category +description: 'Chapter category' +hierarchy: 0 +weight: 0 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/chapters/src/Controller/chaptersController.php b/modules/mansimran/chapters/src/Controller/chaptersController.php new file mode 100644 index 0000000..ed09230 --- /dev/null +++ b/modules/mansimran/chapters/src/Controller/chaptersController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\chapters\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class chaptersController. + */ +class chaptersController 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/chapters/templates/chapters.html.twig b/modules/mansimran/chapters/templates/chapters.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/chapters/templates/chapters.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/chapters/tests/src/Functional/LoadTest.php b/modules/mansimran/chapters/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..d0d8948 --- /dev/null +++ b/modules/mansimran/chapters/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\chapters\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group chapters + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['chapters']; + + /** + * 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/fest/composer.json b/modules/mansimran/fest/composer.json new file mode 100644 index 0000000..4301ff7 --- /dev/null +++ b/modules/mansimran/fest/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/fest", + "type": "drupal-module", + "description": "Importing fest content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/fest", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/fest", + "source": "http://cgit.drupalcode.org/fest" + }, + "require": { } +} diff --git a/modules/mansimran/fest/config/install/core.entity_form_display.node.fest.default.yml b/modules/mansimran/fest/config/install/core.entity_form_display.node.fest.default.yml new file mode 100644 index 0000000..10d5212 --- /dev/null +++ b/modules/mansimran/fest/config/install/core.entity_form_display.node.fest.default.yml @@ -0,0 +1,114 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.fest.body + - field.field.node.fest.field_fest_pics + - field.field.node.fest.field_fest_website + - field.field.node.fest.field_fest_youtube_link + - image.style.thumbnail + - node.type.fest + module: + - image + - link + - path + - text + enforced: + module: + - fest +id: node.fest.default +targetEntityType: node +bundle: fest +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_fest_pics: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_fest_website: + weight: 124 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_fest_youtube_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/fest/config/install/core.entity_view_display.node.fest.default.yml b/modules/mansimran/fest/config/install/core.entity_view_display.node.fest.default.yml new file mode 100644 index 0000000..0aff7cd --- /dev/null +++ b/modules/mansimran/fest/config/install/core.entity_view_display.node.fest.default.yml @@ -0,0 +1,69 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.fest.body + - field.field.node.fest.field_fest_pics + - field.field.node.fest.field_fest_website + - field.field.node.fest.field_fest_youtube_link + - node.type.fest + module: + - image + - link + - text + - user + enforced: + module: + - fest +id: node.fest.default +targetEntityType: node +bundle: fest +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_fest_pics: + weight: 102 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_fest_website: + weight: 104 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_fest_youtube_link: + 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/mansimran/fest/config/install/core.entity_view_display.node.fest.teaser.yml b/modules/mansimran/fest/config/install/core.entity_view_display.node.fest.teaser.yml new file mode 100644 index 0000000..e6f0ef4 --- /dev/null +++ b/modules/mansimran/fest/config/install/core.entity_view_display.node.fest.teaser.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.fest.body + - field.field.node.fest.field_fest_pics + - field.field.node.fest.field_fest_website + - field.field.node.fest.field_fest_youtube_link + - node.type.fest + module: + - text + - user + enforced: + module: + - fest +id: node.fest.teaser +targetEntityType: node +bundle: fest +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_fest_pics: true + field_fest_website: true + field_fest_youtube_link: true + langcode: true diff --git a/modules/mansimran/fest/config/install/field.field.node.fest.body.yml b/modules/mansimran/fest/config/install/field.field.node.fest.body.yml new file mode 100644 index 0000000..392d20b --- /dev/null +++ b/modules/mansimran/fest/config/install/field.field.node.fest.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.fest + module: + - text + enforced: + module: + - fest +id: node.fest.body +field_name: body +entity_type: node +bundle: fest +label: Body +description: 'Description of the fest' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_pics.yml b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_pics.yml new file mode 100644 index 0000000..a5d8788 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_pics.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_fest_pics + - node.type.fest + module: + - image + enforced: + module: + - fest +id: node.fest.field_fest_pics +field_name: field_fest_pics +entity_type: node +bundle: fest +label: 'Fest Pics' +description: 'The Pictures of the fest ' +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/mansimran/fest/config/install/field.field.node.fest.field_fest_website.yml b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_website.yml new file mode 100644 index 0000000..44e7715 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_website.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_fest_website + - node.type.fest + module: + - link + enforced: + module: + - fest +id: node.fest.field_fest_website +field_name: field_fest_website +entity_type: node +bundle: fest +label: 'fest website' +description: 'A link to the website of the fest' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_youtube_link.yml b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_youtube_link.yml new file mode 100644 index 0000000..23751f1 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.field.node.fest.field_fest_youtube_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_fest_youtube_link + - node.type.fest + module: + - link + enforced: + module: + - fest +id: node.fest.field_fest_youtube_link +field_name: field_fest_youtube_link +entity_type: node +bundle: fest +label: 'fest youtube link' +description: 'Fest youtube link' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/fest/config/install/field.storage.node.field_fest_pics.yml b/modules/mansimran/fest/config/install/field.storage.node.field_fest_pics.yml new file mode 100644 index 0000000..223dc80 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.storage.node.field_fest_pics.yml @@ -0,0 +1,33 @@ +uuid: b43f2232-6511-4822-86d9-0e0017831edc +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - fest +id: node.field_fest_pics +field_name: field_fest_pics +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/mansimran/fest/config/install/field.storage.node.field_fest_website.yml b/modules/mansimran/fest/config/install/field.storage.node.field_fest_website.yml new file mode 100644 index 0000000..592a4e0 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.storage.node.field_fest_website.yml @@ -0,0 +1,22 @@ +uuid: 829d8806-5365-42f3-a15d-f0b888a9bc2d +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - fest +id: node.field_fest_website +field_name: field_fest_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/mansimran/fest/config/install/field.storage.node.field_fest_youtube_link.yml b/modules/mansimran/fest/config/install/field.storage.node.field_fest_youtube_link.yml new file mode 100644 index 0000000..a85a314 --- /dev/null +++ b/modules/mansimran/fest/config/install/field.storage.node.field_fest_youtube_link.yml @@ -0,0 +1,22 @@ +uuid: 1c1ca56f-3da3-4f65-8da7-babdaeaffa3d +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - fest +id: node.field_fest_youtube_link +field_name: field_fest_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/mansimran/fest/config/install/migrate_plus.migration.fest_1.yml b/modules/mansimran/fest/config/install/migrate_plus.migration.fest_1.yml new file mode 100644 index 0000000..64317eb --- /dev/null +++ b/modules/mansimran/fest/config/install/migrate_plus.migration.fest_1.yml @@ -0,0 +1,65 @@ +uuid: 7f27a807-6fa9-4d41-bd21-cc6900ab8293 +langcode: en +id: fest_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'fest_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/fest.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/fest + file_dest: 'public://fest1/' +process: + type: + plugin: default_value + default_value: fest + source_path: + - + plugin: skip_on_empty + method: process + source: pictures + - + plugin: concat + delimiter: / + source: + - constants/file_source + - pictures + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_fest_pics: + - + plugin: explode + delimiter: ',' + source: pictures + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest + field_fest_website/uri: website_link + field_fest_website/title: + plugin: default_value + default_value: 'Website Link' + field_fest_youtube_link/uri: youtube_link + field_fest_youtube_link/title: + plugin: default_value + default_value: 'Youtube Link' +destination: + plugin: 'entity:node' + bundle: fest +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/fest/config/install/node.type.fest.yml b/modules/mansimran/fest/config/install/node.type.fest.yml new file mode 100644 index 0000000..974379f --- /dev/null +++ b/modules/mansimran/fest/config/install/node.type.fest.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - fest +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Fest +type: fest +description: 'About the Fests held in VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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.info.yml b/modules/mansimran/fest/fest.info.yml new file mode 100644 index 0000000..c6d4f6f --- /dev/null +++ b/modules/mansimran/fest/fest.info.yml @@ -0,0 +1,14 @@ +name: 'fest' +type: module +description: 'Importing fest content type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:image + - drupal:link + - drupal:path + - drupal:text + - drupal:file + - drupal:node + - drupal:user + - drupal:menu_ui
\ No newline at end of file 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/fest/fest.module b/modules/mansimran/fest/fest.module new file mode 100644 index 0000000..8327ed9 --- /dev/null +++ b/modules/mansimran/fest/fest.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains fest.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function fest_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the fest module. + case 'help.page.fest': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Importing fest content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function fest_theme() { + return [ + 'fest' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/fest/templates/fest.html.twig b/modules/mansimran/fest/templates/fest.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/fest/templates/fest.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/fest/tests/src/Functional/LoadTest.php b/modules/mansimran/fest/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..de3e959 --- /dev/null +++ b/modules/mansimran/fest/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\fest\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group fest + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['fest']; + + /** + * 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/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/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/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); + } + +} diff --git a/modules/mansimran/programs/composer.json b/modules/mansimran/programs/composer.json new file mode 100755 index 0000000..4085028 --- /dev/null +++ b/modules/mansimran/programs/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/programs", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/programs", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/programs", + "source": "http://cgit.drupalcode.org/programs" + }, + "require": { } +} diff --git a/modules/mansimran/programs/config/install/core.entity_form_display.node.programs_offered.default.yml b/modules/mansimran/programs/config/install/core.entity_form_display.node.programs_offered.default.yml new file mode 100755 index 0000000..fee00a4 --- /dev/null +++ b/modules/mansimran/programs/config/install/core.entity_form_display.node.programs_offered.default.yml @@ -0,0 +1,157 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.programs_offered.body + - field.field.node.programs_offered.field_admission_procedure + - field.field.node.programs_offered.field_check_list + - field.field.node.programs_offered.field_counselling_procedure + - field.field.node.programs_offered.field_eligibility + - field.field.node.programs_offered.field_hostel_details + - field.field.node.programs_offered.field_how_to_apply + - field.field.node.programs_offered.field_information_brochure + - field.field.node.programs_offered.field_required_documents + - node.type.programs_offered + module: + - link + - path + - text + enforced: + module: + - programs +id: node.programs_offered.default +targetEntityType: node +bundle: programs_offered +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_admission_procedure: + weight: 130 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_check_list: + weight: 128 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_counselling_procedure: + weight: 125 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_eligibility: + weight: 122 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_hostel_details: + weight: 126 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_how_to_apply: + weight: 127 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_information_brochure: + weight: 124 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_required_documents: + weight: 129 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + 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/programs/config/install/core.entity_view_display.node.programs_offered.default.yml b/modules/mansimran/programs/config/install/core.entity_view_display.node.programs_offered.default.yml new file mode 100755 index 0000000..867ca69 --- /dev/null +++ b/modules/mansimran/programs/config/install/core.entity_view_display.node.programs_offered.default.yml @@ -0,0 +1,101 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.programs_offered.body + - field.field.node.programs_offered.field_admission_procedure + - field.field.node.programs_offered.field_check_list + - field.field.node.programs_offered.field_counselling_procedure + - field.field.node.programs_offered.field_eligibility + - field.field.node.programs_offered.field_hostel_details + - field.field.node.programs_offered.field_how_to_apply + - field.field.node.programs_offered.field_information_brochure + - field.field.node.programs_offered.field_required_documents + - node.type.programs_offered + module: + - link + - text + - user + enforced: + module: + - programs +id: node.programs_offered.default +targetEntityType: node +bundle: programs_offered +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_admission_procedure: + weight: 110 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_check_list: + weight: 108 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_counselling_procedure: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_eligibility: + weight: 102 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_hostel_details: + weight: 106 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_how_to_apply: + weight: 107 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_information_brochure: + weight: 104 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_required_documents: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/mansimran/programs/config/install/core.entity_view_display.node.programs_offered.teaser.yml b/modules/mansimran/programs/config/install/core.entity_view_display.node.programs_offered.teaser.yml new file mode 100755 index 0000000..6520be6 --- /dev/null +++ b/modules/mansimran/programs/config/install/core.entity_view_display.node.programs_offered.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.programs_offered.body + - node.type.programs_offered + module: + - text + - user + enforced: + module: + - programs +id: node.programs_offered.teaser +targetEntityType: node +bundle: programs_offered +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/mansimran/programs/config/install/field.field.node.programs_offered.body.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.body.yml new file mode 100755 index 0000000..e60a59e --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.body +field_name: body +entity_type: node +bundle: programs_offered +label: courses +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_admission_procedure.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_admission_procedure.yml new file mode 100755 index 0000000..7f8c094 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_admission_procedure.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_admission_procedure + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_admission_procedure +field_name: field_admission_procedure +entity_type: node +bundle: programs_offered +label: 'admission procedure' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_check_list.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_check_list.yml new file mode 100755 index 0000000..dca2672 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_check_list.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_check_list + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_check_list +field_name: field_check_list +entity_type: node +bundle: programs_offered +label: 'check list' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_counselling_procedure.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_counselling_procedure.yml new file mode 100755 index 0000000..a31002c --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_counselling_procedure.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_counselling_procedure + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_counselling_procedure +field_name: field_counselling_procedure +entity_type: node +bundle: programs_offered +label: 'counselling procedure' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_eligibility.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_eligibility.yml new file mode 100755 index 0000000..b1ea92d --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_eligibility.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_eligibility + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_eligibility +field_name: field_eligibility +entity_type: node +bundle: programs_offered +label: eligibility +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_hostel_details.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_hostel_details.yml new file mode 100755 index 0000000..60f98ce --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_hostel_details.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_hostel_details + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_hostel_details +field_name: field_hostel_details +entity_type: node +bundle: programs_offered +label: 'hostel details' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_how_to_apply.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_how_to_apply.yml new file mode 100755 index 0000000..a85e1c9 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_how_to_apply.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_how_to_apply + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_how_to_apply +field_name: field_how_to_apply +entity_type: node +bundle: programs_offered +label: 'how to apply' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_information_brochure.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_information_brochure.yml new file mode 100755 index 0000000..a83270c --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_information_brochure.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_information_brochure + - node.type.programs_offered + module: + - link + enforced: + module: + - programs +id: node.programs_offered.field_information_brochure +field_name: field_information_brochure +entity_type: node +bundle: programs_offered +label: 'information brochure' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_required_documents.yml b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_required_documents.yml new file mode 100755 index 0000000..587a362 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.field.node.programs_offered.field_required_documents.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_required_documents + - node.type.programs_offered + module: + - text + enforced: + module: + - programs +id: node.programs_offered.field_required_documents +field_name: field_required_documents +entity_type: node +bundle: programs_offered +label: 'required documents' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/modules/mansimran/programs/config/install/field.storage.node.field_admission_procedure.yml b/modules/mansimran/programs/config/install/field.storage.node.field_admission_procedure.yml new file mode 100755 index 0000000..fb89d4f --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_admission_procedure.yml @@ -0,0 +1,22 @@ +uuid: 2f8dffc4-0fec-4ab1-8a86-b8ffe1ecb9c7 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_admission_procedure +field_name: field_admission_procedure +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/mansimran/programs/config/install/field.storage.node.field_check_list.yml b/modules/mansimran/programs/config/install/field.storage.node.field_check_list.yml new file mode 100755 index 0000000..abfdd5b --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_check_list.yml @@ -0,0 +1,22 @@ +uuid: 6db3a9c7-6d4d-4a9c-a4c1-8316d39913bf +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_check_list +field_name: field_check_list +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/mansimran/programs/config/install/field.storage.node.field_counselling_procedure.yml b/modules/mansimran/programs/config/install/field.storage.node.field_counselling_procedure.yml new file mode 100755 index 0000000..6c6657a --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_counselling_procedure.yml @@ -0,0 +1,22 @@ +uuid: 58e414fb-a660-49e4-bc1c-3935d4c30a15 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_counselling_procedure +field_name: field_counselling_procedure +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/mansimran/programs/config/install/field.storage.node.field_eligibility.yml b/modules/mansimran/programs/config/install/field.storage.node.field_eligibility.yml new file mode 100755 index 0000000..072484a --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_eligibility.yml @@ -0,0 +1,22 @@ +uuid: d4a23da2-0f38-4414-90e0-2f795afdae30 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_eligibility +field_name: field_eligibility +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/mansimran/programs/config/install/field.storage.node.field_hostel_details.yml b/modules/mansimran/programs/config/install/field.storage.node.field_hostel_details.yml new file mode 100755 index 0000000..0fc2632 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_hostel_details.yml @@ -0,0 +1,22 @@ +uuid: aa774c28-4974-46a5-9ac3-af521863c6ff +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_hostel_details +field_name: field_hostel_details +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/mansimran/programs/config/install/field.storage.node.field_how_to_apply.yml b/modules/mansimran/programs/config/install/field.storage.node.field_how_to_apply.yml new file mode 100755 index 0000000..fb8124a --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_how_to_apply.yml @@ -0,0 +1,22 @@ +uuid: bd6074ff-88e1-456c-a30a-26b3108c7d50 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_how_to_apply +field_name: field_how_to_apply +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/mansimran/programs/config/install/field.storage.node.field_information_brochure.yml b/modules/mansimran/programs/config/install/field.storage.node.field_information_brochure.yml new file mode 100755 index 0000000..9abe904 --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_information_brochure.yml @@ -0,0 +1,22 @@ +uuid: 802f6758-89ef-42a4-9e45-95d9f2e9a088 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - programs +id: node.field_information_brochure +field_name: field_information_brochure +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/programs/config/install/field.storage.node.field_required_documents.yml b/modules/mansimran/programs/config/install/field.storage.node.field_required_documents.yml new file mode 100755 index 0000000..8aafeaa --- /dev/null +++ b/modules/mansimran/programs/config/install/field.storage.node.field_required_documents.yml @@ -0,0 +1,22 @@ +uuid: 13d44f7f-5d9a-4c4b-aba3-e5fc4f105d81 +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - programs +id: node.field_required_documents +field_name: field_required_documents +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/mansimran/programs/config/install/migrate_plus.migration.programs_offered_1.yml b/modules/mansimran/programs/config/install/migrate_plus.migration.programs_offered_1.yml new file mode 100644 index 0000000..a9eb3ce --- /dev/null +++ b/modules/mansimran/programs/config/install/migrate_plus.migration.programs_offered_1.yml @@ -0,0 +1,63 @@ +uuid: 2eb5920b-fc8c-41ab-a644-94eb0c0b04fa +langcode: en +id: programs_offered_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'programs_offered_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/program.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: programs_offered + title: title + body/value: courses + body/format: + plugin: default_value + default_value: basic_html + field_admission_procedure/value: admission_procedure + field_admission_procedure/format: + plugin: default_value + default_value: basic_html + field_check_list/value: check_list + field_check_list/format: + plugin: default_value + default_value: basic_html + field_counselling_procedure/value: counselling_procedure + field_counselling_procedure/format: + plugin: default_value + default_value: basic_html + field_eligibility/value: eligibility + field_eligibility/format: + plugin: default_value + default_value: basic_html + field_hostel_details/value: hostel_details + field_hostel_details/format: + plugin: default_value + default_value: basic_html + field_how_to_apply/value: how_to_apply + field_how_to_apply/format: + plugin: default_value + default_value: basic_html + field_information_brochure/uri: information_brochure + field_required_documents/value: required_documents + field_required_documents/format: + plugin: default_value + default_value: basic_html +destination: + plugin: 'entity:node' + bundle: programs_offered +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/programs/config/install/node.type.programs_offered.yml b/modules/mansimran/programs/config/install/node.type.programs_offered.yml new file mode 100755 index 0000000..cdef181 --- /dev/null +++ b/modules/mansimran/programs/config/install/node.type.programs_offered.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - programs +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'programs offered' +type: programs_offered +description: 'Programs offered by Vit' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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.info.yml b/modules/mansimran/programs/programs.info.yml new file mode 100755 index 0000000..18bf5a8 --- /dev/null +++ b/modules/mansimran/programs/programs.info.yml @@ -0,0 +1,12 @@ +name: 'programs' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependecies: + - drupal:path + - drupal:link + - drupal:text + - drupal:user + - drupal:node + - drupal:menu_ui 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/programs/programs.module b/modules/mansimran/programs/programs.module new file mode 100755 index 0000000..ee88e2b --- /dev/null +++ b/modules/mansimran/programs/programs.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains programs.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function programs_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the programs module. + case 'help.page.programs': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function programs_theme() { + return [ + 'programs' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/programs/templates/programs.html.twig b/modules/mansimran/programs/templates/programs.html.twig new file mode 100755 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/programs/templates/programs.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/programs/tests/src/Functional/LoadTest.php b/modules/mansimran/programs/tests/src/Functional/LoadTest.php new file mode 100755 index 0000000..8d3d7ab --- /dev/null +++ b/modules/mansimran/programs/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\programs\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group programs + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['programs']; + + /** + * 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/research_centers/composer.json b/modules/mansimran/research_centers/composer.json new file mode 100644 index 0000000..d1be1cc --- /dev/null +++ b/modules/mansimran/research_centers/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/research_centers", + "type": "drupal-module", + "description": "Research centers content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/research_centers", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/research_centers", + "source": "http://cgit.drupalcode.org/research_centers" + }, + "require": { } +} diff --git a/modules/mansimran/research_centers/config/install/core.entity_form_display.node.research_centers.default.yml b/modules/mansimran/research_centers/config/install/core.entity_form_display.node.research_centers.default.yml new file mode 100644 index 0000000..4d1a00a --- /dev/null +++ b/modules/mansimran/research_centers/config/install/core.entity_form_display.node.research_centers.default.yml @@ -0,0 +1,84 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.research_centers.body + - node.type.research_centers + module: + - path + - text + enforced: + module: + - research_centers +id: node.research_centers.default +targetEntityType: node +bundle: research_centers +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/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.default.yml b/modules/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.default.yml new file mode 100644 index 0000000..cc5ce4f --- /dev/null +++ b/modules/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.default.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.research_centers.body + - node.type.research_centers + module: + - text + - user + enforced: + module: + - research_centers +id: node.research_centers.default +targetEntityType: node +bundle: research_centers +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/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.teaser.yml b/modules/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.teaser.yml new file mode 100644 index 0000000..209e923 --- /dev/null +++ b/modules/mansimran/research_centers/config/install/core.entity_view_display.node.research_centers.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.research_centers.body + - node.type.research_centers + module: + - text + - user + enforced: + module: + - research_centers +id: node.research_centers.teaser +targetEntityType: node +bundle: research_centers +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/research_centers/config/install/field.field.node.research_centers.body.yml b/modules/mansimran/research_centers/config/install/field.field.node.research_centers.body.yml new file mode 100644 index 0000000..47e04d8 --- /dev/null +++ b/modules/mansimran/research_centers/config/install/field.field.node.research_centers.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.research_centers + module: + - text + enforced: + module: + - research_centers +id: node.research_centers.body +field_name: body +entity_type: node +bundle: research_centers +label: Body +description: 'Description about the functionality of the research center' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/research_centers/config/install/migrate_plus.migration.research_center_1.yml b/modules/mansimran/research_centers/config/install/migrate_plus.migration.research_center_1.yml new file mode 100644 index 0000000..313b730 --- /dev/null +++ b/modules/mansimran/research_centers/config/install/migrate_plus.migration.research_center_1.yml @@ -0,0 +1,45 @@ +uuid: 7668fb9e-4358-4d30-b9e1-1cb8071ceba0 +langcode: en +id: research_center_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'research_center_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/research_centers.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: research_centers + 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 +destination: + plugin: 'entity:node' + bundle: club_and_chapter +migration_dependencies: + required: { } + optional: { } diff --git a/modules/mansimran/research_centers/config/install/node.type.research_centers.yml b/modules/mansimran/research_centers/config/install/node.type.research_centers.yml new file mode 100644 index 0000000..032c16a --- /dev/null +++ b/modules/mansimran/research_centers/config/install/node.type.research_centers.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - research_centers +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Research Centers' +type: research_centers +description: 'The different Research Centers of VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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.info.yml b/modules/mansimran/research_centers/research_centers.info.yml new file mode 100644 index 0000000..35b4f19 --- /dev/null +++ b/modules/mansimran/research_centers/research_centers.info.yml @@ -0,0 +1,10 @@ +name: 'research centers' +type: module +description: 'Research centers content type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:path
\ No newline at end of file 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/research_centers/research_centers.module b/modules/mansimran/research_centers/research_centers.module new file mode 100644 index 0000000..ea01abc --- /dev/null +++ b/modules/mansimran/research_centers/research_centers.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains research_centers.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function research_centers_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the research_centers module. + case 'help.page.research_centers': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Research centers content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function research_centers_theme() { + return [ + 'research_centers' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/research_centers/templates/research-centers.html.twig b/modules/mansimran/research_centers/templates/research-centers.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/research_centers/templates/research-centers.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/research_centers/tests/src/Functional/LoadTest.php b/modules/mansimran/research_centers/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..42318ed --- /dev/null +++ b/modules/mansimran/research_centers/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\research_centers\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group research_centers + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['research_centers']; + + /** + * 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/sae_teams/composer.json b/modules/mansimran/sae_teams/composer.json new file mode 100644 index 0000000..c1314eb --- /dev/null +++ b/modules/mansimran/sae_teams/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/sae_teams", + "type": "drupal-module", + "description": "sae teams content type import", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/sae_teams", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/sae_teams", + "source": "http://cgit.drupalcode.org/sae_teams" + }, + "require": { } +} diff --git a/modules/mansimran/sae_teams/config/install/core.entity_form_display.node.sae_teams_.default.yml b/modules/mansimran/sae_teams/config/install/core.entity_form_display.node.sae_teams_.default.yml new file mode 100644 index 0000000..a986535 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/core.entity_form_display.node.sae_teams_.default.yml @@ -0,0 +1,114 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.sae_teams_.body + - field.field.node.sae_teams_.field_sae_facebook_link + - field.field.node.sae_teams_.field_team_photo + - field.field.node.sae_teams_.field_youtube_link + - image.style.thumbnail + - node.type.sae_teams_ + module: + - image + - link + - path + - text + enforced: + module: + - sae_teams +id: node.sae_teams_.default +targetEntityType: node +bundle: sae_teams_ +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_sae_facebook_link: + weight: 124 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_team_photo: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_youtube_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/sae_teams/config/install/core.entity_view_display.node.sae_teams_.default.yml b/modules/mansimran/sae_teams/config/install/core.entity_view_display.node.sae_teams_.default.yml new file mode 100644 index 0000000..6a05f95 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/core.entity_view_display.node.sae_teams_.default.yml @@ -0,0 +1,69 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.sae_teams_.body + - field.field.node.sae_teams_.field_sae_facebook_link + - field.field.node.sae_teams_.field_team_photo + - field.field.node.sae_teams_.field_youtube_link + - node.type.sae_teams_ + module: + - image + - link + - text + - user + enforced: + module: + - sae_teams +id: node.sae_teams_.default +targetEntityType: node +bundle: sae_teams_ +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_sae_facebook_link: + weight: 104 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_team_photo: + weight: 102 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_youtube_link: + weight: 103 + label: hidden + 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/sae_teams/config/install/core.entity_view_display.node.sae_teams_.teaser.yml b/modules/mansimran/sae_teams/config/install/core.entity_view_display.node.sae_teams_.teaser.yml new file mode 100644 index 0000000..19b81e7 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/core.entity_view_display.node.sae_teams_.teaser.yml @@ -0,0 +1,37 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.sae_teams_.body + - field.field.node.sae_teams_.field_team_photo + - field.field.node.sae_teams_.field_youtube_link + - node.type.sae_teams_ + module: + - text + - user + enforced: + module: + - sae_teams +id: node.sae_teams_.teaser +targetEntityType: node +bundle: sae_teams_ +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_team_photo: true + field_youtube_link: true + langcode: true diff --git a/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.body.yml b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.body.yml new file mode 100644 index 0000000..40261f0 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.sae_teams_ + module: + - text + enforced: + module: + - sae_teams +id: node.sae_teams_.body +field_name: body +entity_type: node +bundle: sae_teams_ +label: Body +description: 'A description about sae teams ' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_sae_facebook_link.yml b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_sae_facebook_link.yml new file mode 100644 index 0000000..aa8b9db --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_sae_facebook_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_sae_facebook_link + - node.type.sae_teams_ + module: + - link + enforced: + module: + - sae_teams +id: node.sae_teams_.field_sae_facebook_link +field_name: field_sae_facebook_link +entity_type: node +bundle: sae_teams_ +label: 'sae Facebook Link' +description: 'Facebook link of sae teams' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_team_photo.yml b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_team_photo.yml new file mode 100644 index 0000000..ac46b44 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_team_photo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_team_photo + - node.type.sae_teams_ + module: + - image + enforced: + module: + - sae_teams +id: node.sae_teams_.field_team_photo +field_name: field_team_photo +entity_type: node +bundle: sae_teams_ +label: 'Team photo' +description: 'Team photo' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: 'sae teams' + 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/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_youtube_link.yml b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_youtube_link.yml new file mode 100644 index 0000000..d5294f2 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.field.node.sae_teams_.field_youtube_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_youtube_link + - node.type.sae_teams_ + module: + - link + enforced: + module: + - sae_teams +id: node.sae_teams_.field_youtube_link +field_name: field_youtube_link +entity_type: node +bundle: sae_teams_ +label: 'youtube link' +description: 'Link to youtube video of the team' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/sae_teams/config/install/field.storage.node.field_sae_facebook_link.yml b/modules/mansimran/sae_teams/config/install/field.storage.node.field_sae_facebook_link.yml new file mode 100644 index 0000000..dad0b20 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.storage.node.field_sae_facebook_link.yml @@ -0,0 +1,22 @@ +uuid: c3d0e69f-f106-4c3f-ba98-ed8bec5cb2c6 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - sae_teams +id: node.field_sae_facebook_link +field_name: field_sae_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/mansimran/sae_teams/config/install/field.storage.node.field_team_photo.yml b/modules/mansimran/sae_teams/config/install/field.storage.node.field_team_photo.yml new file mode 100644 index 0000000..1555173 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.storage.node.field_team_photo.yml @@ -0,0 +1,33 @@ +uuid: e6e5bd57-09d6-4d32-b3bb-c35a57fc4f03 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - sae_teams +id: node.field_team_photo +field_name: field_team_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/mansimran/sae_teams/config/install/field.storage.node.field_youtube_link.yml b/modules/mansimran/sae_teams/config/install/field.storage.node.field_youtube_link.yml new file mode 100644 index 0000000..56a805e --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/field.storage.node.field_youtube_link.yml @@ -0,0 +1,22 @@ +uuid: 65ec1261-0ae4-4501-8feb-037b6eb588c4 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - sae_teams +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/mansimran/sae_teams/config/install/migrate_plus.migration.sae_1.yml b/modules/mansimran/sae_teams/config/install/migrate_plus.migration.sae_1.yml new file mode 100644 index 0000000..ccb6104 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/migrate_plus.migration.sae_1.yml @@ -0,0 +1,60 @@ +uuid: 4a0c36f4-00c8-4961-8b0f-cd1572c8ae11 +langcode: en +id: sae_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'sae_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/sae.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/sae teams + file_dest: 'public://sae teams/' +process: + type: + plugin: default_value + default_value: sae_teams_ + source_path: + - + plugin: skip_on_empty + method: process + source: photo + - + plugin: concat + delimiter: / + source: + - constants/file_source + - photo + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_team_photo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_sae_facebook_link/uri: facebook_link + field_sae_facebook_link/title: + plugin: default_value + default_value: 'Facebook Link' + field_youtube_link/uri: link + field_youtube_link/title: + plugin: default_value + default_value: 'Youtube Link' +destination: + plugin: 'entity:node' + bundle: sae_teams_ +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/sae_teams/config/install/node.type.sae_teams_.yml b/modules/mansimran/sae_teams/config/install/node.type.sae_teams_.yml new file mode 100644 index 0000000..a2100b3 --- /dev/null +++ b/modules/mansimran/sae_teams/config/install/node.type.sae_teams_.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - sae_teams +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'sae teams' +type: sae_teams_ +description: 'Various sae teams of VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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/sae_teams/sae_teams.info.yml b/modules/mansimran/sae_teams/sae_teams.info.yml new file mode 100644 index 0000000..d5d63a5 --- /dev/null +++ b/modules/mansimran/sae_teams/sae_teams.info.yml @@ -0,0 +1,14 @@ +name: 'sae_teams' +type: module +description: 'sae teams content type import' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:link + - drupal:menu_ui + - drupal:image + - drupal:file + diff --git a/modules/mansimran/sae_teams/sae_teams.install b/modules/mansimran/sae_teams/sae_teams.install new file mode 100644 index 0000000..310ab3d --- /dev/null +++ b/modules/mansimran/sae_teams/sae_teams.install @@ -0,0 +1,26 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function sae_teams_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', 'sae_teams_'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} diff --git a/modules/mansimran/sae_teams/sae_teams.module b/modules/mansimran/sae_teams/sae_teams.module new file mode 100644 index 0000000..2b7e12a --- /dev/null +++ b/modules/mansimran/sae_teams/sae_teams.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains sae_teams.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function sae_teams_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the sae_teams module. + case 'help.page.sae_teams': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('sae teams content type import') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function sae_teams_theme() { + return [ + 'sae_teams' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/sae_teams/sae_teams.routing.yml b/modules/mansimran/sae_teams/sae_teams.routing.yml new file mode 100644 index 0000000..fe57c22 --- /dev/null +++ b/modules/mansimran/sae_teams/sae_teams.routing.yml @@ -0,0 +1,8 @@ + +sae_teams.sae_teams_controller_hello: + path: '/sae_teams/hello/{name}' + defaults: + _controller: '\Drupal\sae_teams\Controller\sae_teamsController::hello' + _title: 'sae_teamsController' + requirements: + _permission: 'access content' diff --git a/modules/mansimran/sae_teams/src/Controller/sae_teamsController.php b/modules/mansimran/sae_teams/src/Controller/sae_teamsController.php new file mode 100644 index 0000000..c6b7679 --- /dev/null +++ b/modules/mansimran/sae_teams/src/Controller/sae_teamsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\sae_teams\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class sae_teamsController. + */ +class sae_teamsController 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/sae_teams/templates/sae-teams.html.twig b/modules/mansimran/sae_teams/templates/sae-teams.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/sae_teams/templates/sae-teams.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/sae_teams/tests/src/Functional/LoadTest.php b/modules/mansimran/sae_teams/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..29e42d5 --- /dev/null +++ b/modules/mansimran/sae_teams/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\sae_teams\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group sae_teams + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['sae_teams']; + + /** + * 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/startups/composer.json b/modules/mansimran/startups/composer.json new file mode 100644 index 0000000..d88bf22 --- /dev/null +++ b/modules/mansimran/startups/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/startups", + "type": "drupal-module", + "description": "startups content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/startups", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/startups", + "source": "http://cgit.drupalcode.org/startups" + }, + "require": { } +} diff --git a/modules/mansimran/startups/config/install/core.entity_form_display.node.startups.default.yml b/modules/mansimran/startups/config/install/core.entity_form_display.node.startups.default.yml new file mode 100644 index 0000000..87b0e71 --- /dev/null +++ b/modules/mansimran/startups/config/install/core.entity_form_display.node.startups.default.yml @@ -0,0 +1,123 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.startups.body + - field.field.node.startups.field_fac + - field.field.node.startups.field_startup_image + - field.field.node.startups.field_twitter_link + - field.field.node.startups.field_website_link + - image.style.thumbnail + - node.type.startups + module: + - image + - link + - path + - text + enforced: + module: + - startups +id: node.startups.default +targetEntityType: node +bundle: startups +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_fac: + weight: 125 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_startup_image: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_twitter_link: + weight: 126 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_website_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/startups/config/install/core.entity_view_display.node.startups.default.yml b/modules/mansimran/startups/config/install/core.entity_view_display.node.startups.default.yml new file mode 100644 index 0000000..bbdec6f --- /dev/null +++ b/modules/mansimran/startups/config/install/core.entity_view_display.node.startups.default.yml @@ -0,0 +1,82 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.startups.body + - field.field.node.startups.field_fac + - field.field.node.startups.field_startup_image + - field.field.node.startups.field_twitter_link + - field.field.node.startups.field_website_link + - node.type.startups + module: + - image + - link + - text + - user + enforced: + module: + - startups +id: node.startups.default +targetEntityType: node +bundle: startups +mode: default +content: + body: + label: hidden + type: text_default + weight: 0 + settings: { } + third_party_settings: { } + region: content + field_fac: + weight: 3 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_startup_image: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_twitter_link: + weight: 4 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_website_link: + weight: 2 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 5 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/mansimran/startups/config/install/core.entity_view_display.node.startups.teaser.yml b/modules/mansimran/startups/config/install/core.entity_view_display.node.startups.teaser.yml new file mode 100644 index 0000000..5e33224 --- /dev/null +++ b/modules/mansimran/startups/config/install/core.entity_view_display.node.startups.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.startups.body + - node.type.startups + module: + - text + - user + enforced: + module: + - startups +id: node.startups.teaser +targetEntityType: node +bundle: startups +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/mansimran/startups/config/install/field.field.node.startups.body.yml b/modules/mansimran/startups/config/install/field.field.node.startups.body.yml new file mode 100644 index 0000000..6a5487d --- /dev/null +++ b/modules/mansimran/startups/config/install/field.field.node.startups.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.startups + module: + - text + enforced: + module: + - startups +id: node.startups.body +field_name: body +entity_type: node +bundle: startups +label: Body +description: "description about the startup\r\n\r\n" +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/startups/config/install/field.field.node.startups.field_fac.yml b/modules/mansimran/startups/config/install/field.field.node.startups.field_fac.yml new file mode 100644 index 0000000..6c61da9 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.field.node.startups.field_fac.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_fac + - node.type.startups + module: + - link + enforced: + module: + - startups +id: node.startups.field_fac +field_name: field_fac +entity_type: node +bundle: startups +label: 'Facebook Link' +description: 'Link to facebook page of startup' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/startups/config/install/field.field.node.startups.field_startup_image.yml b/modules/mansimran/startups/config/install/field.field.node.startups.field_startup_image.yml new file mode 100644 index 0000000..2caa6db --- /dev/null +++ b/modules/mansimran/startups/config/install/field.field.node.startups.field_startup_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_startup_image + - node.type.startups + module: + - image + enforced: + module: + - startups +id: node.startups.field_startup_image +field_name: field_startup_image +entity_type: node +bundle: startups +label: 'startup image' +description: 'Image of startup' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: startups + 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/mansimran/startups/config/install/field.field.node.startups.field_twitter_link.yml b/modules/mansimran/startups/config/install/field.field.node.startups.field_twitter_link.yml new file mode 100644 index 0000000..e061215 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.field.node.startups.field_twitter_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_twitter_link + - node.type.startups + module: + - link + enforced: + module: + - startups +id: node.startups.field_twitter_link +field_name: field_twitter_link +entity_type: node +bundle: startups +label: 'Twitter link' +description: 'Link to twitter page of startup' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/startups/config/install/field.field.node.startups.field_website_link.yml b/modules/mansimran/startups/config/install/field.field.node.startups.field_website_link.yml new file mode 100644 index 0000000..0642a80 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.field.node.startups.field_website_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_website_link + - node.type.startups + module: + - link + enforced: + module: + - startups +id: node.startups.field_website_link +field_name: field_website_link +entity_type: node +bundle: startups +label: 'Website link' +description: 'Link to startup website' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/startups/config/install/field.storage.node.field_fac.yml b/modules/mansimran/startups/config/install/field.storage.node.field_fac.yml new file mode 100644 index 0000000..11d144a --- /dev/null +++ b/modules/mansimran/startups/config/install/field.storage.node.field_fac.yml @@ -0,0 +1,22 @@ +uuid: 7d236b24-5c49-4453-bd3a-1677efa27756 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - startups +id: node.field_fac +field_name: field_fac +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/startups/config/install/field.storage.node.field_startup_image.yml b/modules/mansimran/startups/config/install/field.storage.node.field_startup_image.yml new file mode 100644 index 0000000..63d4731 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.storage.node.field_startup_image.yml @@ -0,0 +1,33 @@ +uuid: 93845d49-4e40-4b45-afd7-fe72de5fe49d +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - startups +id: node.field_startup_image +field_name: field_startup_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/mansimran/startups/config/install/field.storage.node.field_twitter_link.yml b/modules/mansimran/startups/config/install/field.storage.node.field_twitter_link.yml new file mode 100644 index 0000000..e19d298 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.storage.node.field_twitter_link.yml @@ -0,0 +1,22 @@ +uuid: 37fe0a08-9f47-46b2-9345-153a73d56665 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - startups +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/mansimran/startups/config/install/field.storage.node.field_website_link.yml b/modules/mansimran/startups/config/install/field.storage.node.field_website_link.yml new file mode 100644 index 0000000..6f17116 --- /dev/null +++ b/modules/mansimran/startups/config/install/field.storage.node.field_website_link.yml @@ -0,0 +1,22 @@ +uuid: 66e04bca-9f7d-43c0-a750-8512cd0dd1ba +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - startups +id: node.field_website_link +field_name: field_website_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/startups/config/install/migrate_plus.migration.startups_1.yml b/modules/mansimran/startups/config/install/migrate_plus.migration.startups_1.yml new file mode 100644 index 0000000..c90aa0f --- /dev/null +++ b/modules/mansimran/startups/config/install/migrate_plus.migration.startups_1.yml @@ -0,0 +1,64 @@ +uuid: 428450d7-45f6-400c-b7e1-57b14e9d348d +langcode: en +id: startups_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'startups_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/startups1.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/startups + file_dest: 'public://startups/' +process: + type: + plugin: default_value + default_value: startups + 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_fac/uri: fb_link + field_fac/title: + plugin: default_value + default_value: 'Fb Link' + field_startup_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_twitter_link/uri: twitter_link + field_twitter_link/title: + plugin: default_value + default_value: 'Twitter Link' + field_website_link/uri: website + field_website_link/title: + plugin: default_value + default_value: 'Startup website' +destination: + plugin: 'entity:node' + bundle: startups +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/startups/config/install/node.type.startups.yml b/modules/mansimran/startups/config/install/node.type.startups.yml new file mode 100644 index 0000000..de62c03 --- /dev/null +++ b/modules/mansimran/startups/config/install/node.type.startups.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - startups +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: startups +type: startups +description: 'A list of startups in campus' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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/startups/src/Controller/startupsController.php b/modules/mansimran/startups/src/Controller/startupsController.php new file mode 100644 index 0000000..a80cf11 --- /dev/null +++ b/modules/mansimran/startups/src/Controller/startupsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\startups\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class startupsController. + */ +class startupsController 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/startups/startups.info.yml b/modules/mansimran/startups/startups.info.yml new file mode 100644 index 0000000..96618d1 --- /dev/null +++ b/modules/mansimran/startups/startups.info.yml @@ -0,0 +1,13 @@ +name: 'startups' +type: module +description: 'startups content type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:link + - drupal:file + - drupal:image + - drupal:text + - drupal:user + - drupal:menu_ui diff --git a/modules/mansimran/startups/startups.install b/modules/mansimran/startups/startups.install new file mode 100644 index 0000000..273a08b --- /dev/null +++ b/modules/mansimran/startups/startups.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function startups_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', 'startups'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/startups/startups.module b/modules/mansimran/startups/startups.module new file mode 100644 index 0000000..b704942 --- /dev/null +++ b/modules/mansimran/startups/startups.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains startups.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function startups_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the startups module. + case 'help.page.startups': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('startups content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function startups_theme() { + return [ + 'startups' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/startups/startups.routing.yml b/modules/mansimran/startups/startups.routing.yml new file mode 100644 index 0000000..a1edf8f --- /dev/null +++ b/modules/mansimran/startups/startups.routing.yml @@ -0,0 +1,8 @@ + +startups.startups_controller_hello: + path: '/startups/hello/{name}' + defaults: + _controller: '\Drupal\startups\Controller\startupsController::hello' + _title: 'startupsController' + requirements: + _permission: 'access content' diff --git a/modules/mansimran/startups/templates/startups.html.twig b/modules/mansimran/startups/templates/startups.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/startups/templates/startups.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/startups/tests/src/Functional/LoadTest.php b/modules/mansimran/startups/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..949df7a --- /dev/null +++ b/modules/mansimran/startups/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\startups\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group startups + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['startups']; + + /** + * 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/student_clubs/composer.json b/modules/mansimran/student_clubs/composer.json new file mode 100755 index 0000000..3c4d6b7 --- /dev/null +++ b/modules/mansimran/student_clubs/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/student_clubs", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/student_clubs", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/student_clubs", + "source": "http://cgit.drupalcode.org/student_clubs" + }, + "require": { } +} diff --git a/modules/mansimran/student_clubs/config/install/core.entity_form_display.node.club_and_chapter.default.yml b/modules/mansimran/student_clubs/config/install/core.entity_form_display.node.club_and_chapter.default.yml new file mode 100755 index 0000000..e08e012 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/core.entity_form_display.node.club_and_chapter.default.yml @@ -0,0 +1,115 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.club_and_chapter.body + - field.field.node.club_and_chapter.field_facebook_link + - field.field.node.club_and_chapter.field_logo_of_organisation + - field.field.node.club_and_chapter.field_organisation_category + - image.style.thumbnail + - node.type.club_and_chapter + module: + - image + - link + - path + - text + enforced: + module: + - student_clubs +id: node.club_and_chapter.default +targetEntityType: node +bundle: club_and_chapter +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_facebook_link: + weight: 125 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_logo_of_organisation: + weight: 123 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_organisation_category: + weight: 127 + 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/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.default.yml b/modules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.default.yml new file mode 100755 index 0000000..7cf416f --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.default.yml @@ -0,0 +1,65 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.club_and_chapter.body + - field.field.node.club_and_chapter.field_facebook_link + - field.field.node.club_and_chapter.field_logo_of_organisation + - field.field.node.club_and_chapter.field_organisation_category + - node.type.club_and_chapter + module: + - image + - link + - text + - user + enforced: + module: + - student_clubs +id: node.club_and_chapter.default +targetEntityType: node +bundle: club_and_chapter +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_facebook_link: + weight: 105 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_logo_of_organisation: + weight: 103 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_organisation_category: + weight: 107 + 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/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.teaser.yml b/modules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.teaser.yml new file mode 100755 index 0000000..c9112c6 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.teaser.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.club_and_chapter.body + - field.field.node.club_and_chapter.field_facebook_link + - field.field.node.club_and_chapter.field_logo_of_organisation + - field.field.node.club_and_chapter.field_organisation_category + - node.type.club_and_chapter + module: + - text + - user + enforced: + module: + - student_clubs +id: node.club_and_chapter.teaser +targetEntityType: node +bundle: club_and_chapter +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_facebook_link: true + field_logo_of_organisation: true + field_organisation_category: true + langcode: true diff --git a/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.body.yml b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.body.yml new file mode 100755 index 0000000..246a310 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.club_and_chapter + module: + - text + enforced: + module: + - student_clubs +id: node.club_and_chapter.body +field_name: body +entity_type: node +bundle: club_and_chapter +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/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_facebook_link.yml b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_facebook_link.yml new file mode 100755 index 0000000..f2c9f9c --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_facebook_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facebook_link + - node.type.club_and_chapter + module: + - link + enforced: + module: + - student_clubs +id: node.club_and_chapter.field_facebook_link +field_name: field_facebook_link +entity_type: node +bundle: club_and_chapter +label: 'Facebook Link' +description: 'Link to Facebook page' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_logo_of_organisation.yml b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_logo_of_organisation.yml new file mode 100755 index 0000000..0d04a2c --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_logo_of_organisation.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_logo_of_organisation + - node.type.club_and_chapter + module: + - image + enforced: + module: + - student_clubs +id: node.club_and_chapter.field_logo_of_organisation +field_name: field_logo_of_organisation +entity_type: node +bundle: club_and_chapter +label: 'logo of organisation' +description: 'Logo of the organisation' +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/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_organisation_category.yml b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_organisation_category.yml new file mode 100755 index 0000000..5f2b3ac --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_organisation_category.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_organisation_category + - node.type.club_and_chapter + - taxonomy.vocabulary.category_of_organisation + enforced: + module: + - student_clubs +id: node.club_and_chapter.field_organisation_category +field_name: field_organisation_category +entity_type: node +bundle: club_and_chapter +label: 'organisation category' +description: 'The category the organisation belongs to' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + category_of_organisation: category_of_organisation + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/mansimran/student_clubs/config/install/field.storage.node.field_facebook_link.yml b/modules/mansimran/student_clubs/config/install/field.storage.node.field_facebook_link.yml new file mode 100755 index 0000000..05130d9 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.storage.node.field_facebook_link.yml @@ -0,0 +1,22 @@ +uuid: 917eb7d1-49da-4380-9a0b-77420dde9291 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - student_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/mansimran/student_clubs/config/install/field.storage.node.field_logo_of_organisation.yml b/modules/mansimran/student_clubs/config/install/field.storage.node.field_logo_of_organisation.yml new file mode 100755 index 0000000..544b5bf --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.storage.node.field_logo_of_organisation.yml @@ -0,0 +1,33 @@ +uuid: 27f5a0a1-f8e2-42ec-93e1-ee75b849a3ee +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - student_clubs +id: node.field_logo_of_organisation +field_name: field_logo_of_organisation +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/mansimran/student_clubs/config/install/field.storage.node.field_organisation_category.yml b/modules/mansimran/student_clubs/config/install/field.storage.node.field_organisation_category.yml new file mode 100755 index 0000000..3d57205 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/field.storage.node.field_organisation_category.yml @@ -0,0 +1,23 @@ +uuid: 5baf6269-cae5-4f3f-a820-4793dc32036e +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - student_clubs +id: node.field_organisation_category +field_name: field_organisation_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/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml b/modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml new file mode 100644 index 0000000..d516c01 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml @@ -0,0 +1,61 @@ +uuid: 9a260262-706e-4344-9798-3c4e4f0ef0c4 +langcode: en +id: clubs_1 +status: true +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'clubs_csv_import1' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/clubs1.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/clubs + file_dest: 'public://clubs/' +process: + type: + plugin: default_value + default_value: club_and_chapter + 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_logo_of_organisation: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_facebook_link/uri: fb_link + field_facebook_link/title: + plugin: default_value + default_value: 'Fb Link' + field_organisation_category: + plugin: entity_lookup + entity_type: taxonomy_term + bundle: category_of_organisation + source: organisation_category +destination: + plugin: 'entity:node' + bundle: club_and_chapter +migration_dependencies: + required: { } + optional: { } diff --git a/modules/mansimran/student_clubs/config/install/node.type.club_and_chapter.yml b/modules/mansimran/student_clubs/config/install/node.type.club_and_chapter.yml new file mode 100755 index 0000000..043bbe0 --- /dev/null +++ b/modules/mansimran/student_clubs/config/install/node.type.club_and_chapter.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - student_clubs +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Student Clubs' +type: club_and_chapter +description: 'Clubs in VIT' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false 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.info.yml b/modules/mansimran/student_clubs/student_clubs.info.yml new file mode 100755 index 0000000..651ed7d --- /dev/null +++ b/modules/mansimran/student_clubs/student_clubs.info.yml @@ -0,0 +1,16 @@ +name: 'Student Clubs' +type: module +description: 'My Awesome Module' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:menu_ui + - drupal:taxonomy + - drupal:file + - drupal:image + - drupal:link + - drupal:text + - drupal:user + - drupal:path + 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/student_clubs/student_clubs.module b/modules/mansimran/student_clubs/student_clubs.module new file mode 100755 index 0000000..54b221f --- /dev/null +++ b/modules/mansimran/student_clubs/student_clubs.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains student_clubs.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function student_clubs_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the student_clubs module. + case 'help.page.student_clubs': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function student_clubs_theme() { + return [ + 'student_clubs' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/student_clubs/templates/student-clubs.html.twig b/modules/mansimran/student_clubs/templates/student-clubs.html.twig new file mode 100755 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/student_clubs/templates/student-clubs.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/student_clubs/tests/src/Functional/LoadTest.php b/modules/mansimran/student_clubs/tests/src/Functional/LoadTest.php new file mode 100755 index 0000000..2d4cfeb --- /dev/null +++ b/modules/mansimran/student_clubs/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\student_clubs\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group student_clubs + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['student_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/mansimran/test.txt b/modules/mansimran/test.txt new file mode 100644 index 0000000..9e47d10 --- /dev/null +++ b/modules/mansimran/test.txt @@ -0,0 +1 @@ +this is the test file diff --git a/modules/mansimran/testimonials/composer.json b/modules/mansimran/testimonials/composer.json new file mode 100644 index 0000000..a1f333e --- /dev/null +++ b/modules/mansimran/testimonials/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/testimonials", + "type": "drupal-module", + "description": "importing testimonials content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/testimonials", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/testimonials", + "source": "http://cgit.drupalcode.org/testimonials" + }, + "require": { } +} diff --git a/modules/mansimran/testimonials/config/install/core.entity_form_display.node.testimonials.default.yml b/modules/mansimran/testimonials/config/install/core.entity_form_display.node.testimonials.default.yml new file mode 100644 index 0000000..d8d23ef --- /dev/null +++ b/modules/mansimran/testimonials/config/install/core.entity_form_display.node.testimonials.default.yml @@ -0,0 +1,115 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.testimonials.body + - field.field.node.testimonials.field_country_ + - field.field.node.testimonials.field_program_ + - field.field.node.testimonials.field_student_image + - image.style.thumbnail + - node.type.testimonials + module: + - image + - path + - text + enforced: + module: + - testimonials +id: node.testimonials.default +targetEntityType: node +bundle: testimonials +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_country_: + weight: 124 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_program_: + weight: 123 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_student_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/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.default.yml b/modules/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.default.yml new file mode 100644 index 0000000..ad817dd --- /dev/null +++ b/modules/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.default.yml @@ -0,0 +1,60 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.testimonials.body + - field.field.node.testimonials.field_country_ + - field.field.node.testimonials.field_program_ + - field.field.node.testimonials.field_student_image + - node.type.testimonials + module: + - image + - text + - user + enforced: + module: + - testimonials +id: node.testimonials.default +targetEntityType: node +bundle: testimonials +mode: default +content: + body: + label: hidden + type: text_default + weight: 102 + 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_program_: + weight: 104 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_student_image: + weight: 101 + 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/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.teaser.yml b/modules/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.teaser.yml new file mode 100644 index 0000000..23307c3 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/core.entity_view_display.node.testimonials.teaser.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.testimonials.body + - field.field.node.testimonials.field_country_ + - field.field.node.testimonials.field_program_ + - field.field.node.testimonials.field_student_image + - node.type.testimonials + module: + - text + - user + enforced: + module: + - testimonials +id: node.testimonials.teaser +targetEntityType: node +bundle: testimonials +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_program_: true + field_student_image: true + langcode: true diff --git a/modules/mansimran/testimonials/config/install/field.field.node.testimonials.body.yml b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.body.yml new file mode 100644 index 0000000..db74d78 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.testimonials + module: + - text + enforced: + module: + - testimonials +id: node.testimonials.body +field_name: body +entity_type: node +bundle: testimonials +label: Body +description: 'Description of testimonial given by the student ' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_country_.yml b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_country_.yml new file mode 100644 index 0000000..afc3421 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_country_.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_country_ + - node.type.testimonials + - taxonomy.vocabulary.continent + enforced: + module: + - testimonials +id: node.testimonials.field_country_ +field_name: field_country_ +entity_type: node +bundle: testimonials +label: 'country ' +description: 'Country from where the student originates 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/testimonials/config/install/field.field.node.testimonials.field_program_.yml b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_program_.yml new file mode 100644 index 0000000..b81de70 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_program_.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_program_ + - node.type.testimonials + - taxonomy.vocabulary.program_pursuing_ + enforced: + module: + - testimonials +id: node.testimonials.field_program_ +field_name: field_program_ +entity_type: node +bundle: testimonials +label: 'Program ' +description: 'Gives information about the program he/she has completed or is pursuing' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + program_pursuing_: program_pursuing_ + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_student_image.yml b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_student_image.yml new file mode 100644 index 0000000..ff85c59 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.field.node.testimonials.field_student_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_student_image + - node.type.testimonials + module: + - image + enforced: + module: + - testimonials +id: node.testimonials.field_student_image +field_name: field_student_image +entity_type: node +bundle: testimonials +label: 'Student Image' +description: 'Image of the student whose Testimonial is provided' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: testimonial + 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/mansimran/testimonials/config/install/field.storage.node.field_country_.yml b/modules/mansimran/testimonials/config/install/field.storage.node.field_country_.yml new file mode 100644 index 0000000..3dcf861 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.storage.node.field_country_.yml @@ -0,0 +1,23 @@ +uuid: 26147ff6-1fae-4d52-9ec5-ae8de3abc6d3 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - testimonials +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/testimonials/config/install/field.storage.node.field_program_.yml b/modules/mansimran/testimonials/config/install/field.storage.node.field_program_.yml new file mode 100644 index 0000000..1f64f1b --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.storage.node.field_program_.yml @@ -0,0 +1,23 @@ +uuid: 4e7598dc-e712-44a3-ba6c-c974f9e4cbef +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - testimonials +id: node.field_program_ +field_name: field_program_ +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/testimonials/config/install/field.storage.node.field_student_image.yml b/modules/mansimran/testimonials/config/install/field.storage.node.field_student_image.yml new file mode 100644 index 0000000..c60a819 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/field.storage.node.field_student_image.yml @@ -0,0 +1,33 @@ +uuid: 207192cd-24c9-4e00-a74b-0acb1e96ad4f +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - testimonials +id: node.field_student_image +field_name: field_student_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/mansimran/testimonials/config/install/migrate_plus.migration.testimonial_2.yml b/modules/mansimran/testimonials/config/install/migrate_plus.migration.testimonial_2.yml new file mode 100644 index 0000000..8e509ba --- /dev/null +++ b/modules/mansimran/testimonials/config/install/migrate_plus.migration.testimonial_2.yml @@ -0,0 +1,63 @@ +uuid: 0b678513-347b-4773-9731-1091e135dbda +langcode: en +status: true +id: testimonial_2 +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: testimonial_csv_import2 +source: + plugin: csv + path: /var/www/Testimonials/testimonial_sample.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/testimonials + file_dest: 'public://testimonials/' +process: + type: + plugin: default_value + default_value: testimonials + source_path: + - + plugin: skip_on_empty + method: process + source: photo + - + plugin: concat + delimiter: / + source: + - constants/file_source + - photo + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_student_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_program_: + plugin: entity_lookup + entity_type: taxonomy_term + bundle: continent + source: country + field_country_: + plugin: entity_lookup + entity_type: taxonomy_term + bundle: program_pursuing_ + source: program +destination: + plugin: 'entity:node' + bundle: testimonials +migration_dependencies: + required: { } + optional: { } + diff --git a/modules/mansimran/testimonials/config/install/node.type.testimonials.yml b/modules/mansimran/testimonials/config/install/node.type.testimonials.yml new file mode 100644 index 0000000..daf5719 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/node.type.testimonials.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - testimonials +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Testimonials +type: testimonials +description: 'This page will display the testimonial content of vit of various students' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/mansimran/testimonials/config/install/taxonomy.vocabulary.program_pursuing_.yml b/modules/mansimran/testimonials/config/install/taxonomy.vocabulary.program_pursuing_.yml new file mode 100644 index 0000000..65db2f8 --- /dev/null +++ b/modules/mansimran/testimonials/config/install/taxonomy.vocabulary.program_pursuing_.yml @@ -0,0 +1,12 @@ +uuid: 69a8ee92-8cfc-42b5-a695-c10a1586d295 +langcode: en +status: true +dependencies: + enforced: + module: + - testimonials +name: 'Program pursuing/completed' +vid: program_pursuing_ +description: 'This field gives informtion of the program he is pursuing in VIT' +hierarchy: 0 +weight: 0 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: { } + diff --git a/modules/mansimran/testimonials/templates/testimonials.html.twig b/modules/mansimran/testimonials/templates/testimonials.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/testimonials/templates/testimonials.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/testimonials/testimonials.info.yml b/modules/mansimran/testimonials/testimonials.info.yml new file mode 100644 index 0000000..61bf508 --- /dev/null +++ b/modules/mansimran/testimonials/testimonials.info.yml @@ -0,0 +1,14 @@ +name: 'testimonials' +type: module +description: 'importing testimonials content type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:file + - drupal:menu_ui + - drupal:taxonomy + - drupal:image + - drupal:path
\ No newline at end of file diff --git a/modules/mansimran/testimonials/testimonials.install b/modules/mansimran/testimonials/testimonials.install new file mode 100644 index 0000000..1a7482f --- /dev/null +++ b/modules/mansimran/testimonials/testimonials.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function testimonials_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', 'testimonials'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/testimonials/testimonials.module b/modules/mansimran/testimonials/testimonials.module new file mode 100644 index 0000000..fd3e3d1 --- /dev/null +++ b/modules/mansimran/testimonials/testimonials.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains testimonials.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function testimonials_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the testimonials module. + case 'help.page.testimonials': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('importing testimonials content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function testimonials_theme() { + return [ + 'testimonials' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/testimonials/tests/src/Functional/LoadTest.php b/modules/mansimran/testimonials/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..6adde24 --- /dev/null +++ b/modules/mansimran/testimonials/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\testimonials\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group testimonials + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['testimonials']; + + /** + * 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); + } + +} |