diff options
562 files changed, 17555 insertions, 0 deletions
diff --git a/modules/bhavika/admission_program/admission_program.info.yml b/modules/bhavika/admission_program/admission_program.info.yml new file mode 100644 index 0000000..dcae984 --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.info.yml @@ -0,0 +1,16 @@ +name: admission_program +type: module +description: 'This module is for different programs like ug,pg,etc' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/admission_program/admission_program.install b/modules/bhavika/admission_program/admission_program.install new file mode 100644 index 0000000..d28043c --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function admission_program_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'new'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/admission_program/admission_program.module b/modules/bhavika/admission_program/admission_program.module new file mode 100644 index 0000000..ec48694 --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains admission_program.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function admission_program_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the admission_program module. + case 'help.page.admission_program': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for different programs like ug,pg,etc') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function admission_program_theme() { + return [ + 'admission_program' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/admission_program/admission_program.routing.yml b/modules/bhavika/admission_program/admission_program.routing.yml new file mode 100644 index 0000000..8bab6bc --- /dev/null +++ b/modules/bhavika/admission_program/admission_program.routing.yml @@ -0,0 +1,8 @@ + +admission_program.admission_program_controller_admission_program: + path: '/admission_program' + defaults: + _controller: '\Drupal\admission_program\Controller\AdmissionProgramController::admission_program' + _title: 'Admission Program Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/admission_program/composer.json b/modules/bhavika/admission_program/composer.json new file mode 100644 index 0000000..307177b --- /dev/null +++ b/modules/bhavika/admission_program/composer.json @@ -0,0 +1,13 @@ +{ + "name": "admission_program", + "type": "drupal-module", + "description": "This module is for different programs like ug,pg,etc", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/admission_program", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/admission_program", + "source": "http://cgit.drupalcode.org/admission_program", + }, +} diff --git a/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml b/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml new file mode 100644 index 0000000..fa98799 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_form_display.node.new.default.yml @@ -0,0 +1,129 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.new.body + - field.field.node.new.field_category1 + - field.field.node.new.field_departmentnew + - field.field.node.new.field_intake1 + - field.field.node.new.field_period + - field.field.node.new.field_year_of_starting + - node.type.new + module: + - path + - text + enforced: + module: + - admission_program +id: node.new.default +targetEntityType: node +bundle: new +mode: default +content: + body: + type: text_textarea_with_summary + weight: 121 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_category1: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_departmentnew: + weight: 127 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_intake1: + weight: 124 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_period: + weight: 125 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_year_of_starting: + weight: 126 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml new file mode 100644 index 0000000..435e308 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.default.yml @@ -0,0 +1,78 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.new.body + - field.field.node.new.field_category1 + - field.field.node.new.field_departmentnew + - field.field.node.new.field_intake1 + - field.field.node.new.field_period + - field.field.node.new.field_year_of_starting + - node.type.new + module: + - text + - user + enforced: + module: + - admission_program +id: node.new.default +targetEntityType: node +bundle: new +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_category1: + weight: 102 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_departmentnew: + weight: 107 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_intake1: + weight: 104 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_period: + weight: 105 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_year_of_starting: + weight: 106 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml new file mode 100644 index 0000000..337300c --- /dev/null +++ b/modules/bhavika/admission_program/config/install/core.entity_view_display.node.new.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.new.body + - node.type.new + module: + - text + - user + enforced: + module: + - admission_program +id: node.new.teaser +targetEntityType: node +bundle: new +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml new file mode 100644 index 0000000..c370e60 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.new + module: + - text + enforced: + module: + - admission_program +id: node.new.body +field_name: body +entity_type: node +bundle: new +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml new file mode 100644 index 0000000..9782c3c --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_category1.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_category1 + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_category1 +field_name: field_category1 +entity_type: node +bundle: new +label: Category +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: { } + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml new file mode 100644 index 0000000..6315697 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_departmentnew.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_departmentnew + - node.type.department + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_departmentnew +field_name: field_departmentnew +entity_type: node +bundle: new +label: Department +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + department: department + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml new file mode 100644 index 0000000..496524a --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_intake1.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_intake1 + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_intake1 +field_name: field_intake1 +entity_type: node +bundle: new +label: Intake +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml new file mode 100644 index 0000000..2e46f14 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_period.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_period + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_period +field_name: field_period +entity_type: node +bundle: new +label: Period +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml b/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml new file mode 100644 index 0000000..b38aaa8 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.field.node.new.field_year_of_starting.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_year_of_starting + - node.type.new + enforced: + module: + - admission_program +id: node.new.field_year_of_starting +field_name: field_year_of_starting +entity_type: node +bundle: new +label: 'year of starting' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml new file mode 100644 index 0000000..777087d --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_category1.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - taxonomy +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - admission_program +id: node.field_category1 +field_name: field_category1 +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml new file mode 100644 index 0000000..64e4e9e --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_departmentnew.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + enforced: + module: + - admission_program +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_departmentnew +field_name: field_departmentnew +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml new file mode 100644 index 0000000..ea56a4e --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_intake1.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - admission_program +id: node.field_intake1 +field_name: field_intake1 +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml new file mode 100644 index 0000000..5fe7d64 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_period.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - admission_program +id: node.field_period +field_name: field_period +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml b/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml new file mode 100644 index 0000000..c912cd9 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/field.storage.node.field_year_of_starting.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + enforced: + module: + - admission_program +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_year_of_starting +field_name: field_year_of_starting +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml b/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml new file mode 100644 index 0000000..e6d69cb --- /dev/null +++ b/modules/bhavika/admission_program/config/install/migrate_plus.migration.course_new.yml @@ -0,0 +1,46 @@ +uuid: 0acf77ca-22a7-4526-960a-8be56feadb1d +language: en +migration_group: default +id: course_new +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'course_import' +source: + plugin: csv + path: /var/www/Course/sample.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: new + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_category1: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: category + source: category + field_period: period + field_intake1: intake + field_year_of_starting: year_of_starting + field_departmentnew: + - + plugin: entity_lookup + entity_type: node + bundle: department + source: department +destination: + plugin: 'entity:node' + bundle: new +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/admission_program/config/install/node.type.new.yml b/modules/bhavika/admission_program/config/install/node.type.new.yml new file mode 100644 index 0000000..9a457a3 --- /dev/null +++ b/modules/bhavika/admission_program/config/install/node.type.new.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - admission_program +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Admission_program +type: new +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php b/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php new file mode 100644 index 0000000..d701144 --- /dev/null +++ b/modules/bhavika/admission_program/src/Controller/AdmissionProgramController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\admission_program\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class AdmissionProgramController. + */ +class AdmissionProgramController extends ControllerBase { + + /** + * Admission_program. + * + * @return string + * Return Hello string. + */ + public function admission_program() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: admission_program') + ]; + } + +} diff --git a/modules/bhavika/admission_program/templates/admission-program.html.twig b/modules/bhavika/admission_program/templates/admission-program.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/admission_program/templates/admission-program.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php new file mode 100644 index 0000000..3f828c9 --- /dev/null +++ b/modules/bhavika/admission_program/tests/Controller/AdmissionProgramControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\admission_program\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the admission_program module. + */ +class AdmissionProgramControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "admission_program AdmissionProgramController's controller functionality", + 'description' => 'Test Unit for module admission_program and controller AdmissionProgramController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests admission_program functionality. + */ + public function testAdmissionProgramController() { + // Check that the basic functions of module admission_program. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..ff2491f --- /dev/null +++ b/modules/bhavika/admission_program/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\admission_program\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group admission_program + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['admission_program']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/company/company.info.yml b/modules/bhavika/company/company.info.yml new file mode 100644 index 0000000..3132ff7 --- /dev/null +++ b/modules/bhavika/company/company.info.yml @@ -0,0 +1,18 @@ +name: company +type: module +description: 'Company module is for companies content type for placements' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:image + - drupal:link + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/company/company.install b/modules/bhavika/company/company.install new file mode 100644 index 0000000..09b0cb0 --- /dev/null +++ b/modules/bhavika/company/company.install @@ -0,0 +1,64 @@ + +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function company_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'companies'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/company/company.module b/modules/bhavika/company/company.module new file mode 100644 index 0000000..b060f46 --- /dev/null +++ b/modules/bhavika/company/company.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains company.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function company_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the company module. + case 'help.page.company': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Company module is for companies content type for placements') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function company_theme() { + return [ + 'company' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/company/company.routing.yml b/modules/bhavika/company/company.routing.yml new file mode 100644 index 0000000..1997efb --- /dev/null +++ b/modules/bhavika/company/company.routing.yml @@ -0,0 +1,8 @@ + +company.company_controller_company_43: + path: '/company_' + defaults: + _controller: '\Drupal\company\Controller\CompanyController::company' + _title: 'Company Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/company/composer.json b/modules/bhavika/company/composer.json new file mode 100644 index 0000000..4158875 --- /dev/null +++ b/modules/bhavika/company/composer.json @@ -0,0 +1,13 @@ +{ + "name": "company", + "type": "drupal-module", + "description": "Company module is for companies content type for placements", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/company", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/company", + "source": "http://cgit.drupalcode.org/company", + }, +} diff --git a/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml b/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml new file mode 100644 index 0000000..d8dc6ea --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_form_display.node.companies.default.yml @@ -0,0 +1,105 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.companies.body + - field.field.node.companies.field_company_link + - field.field.node.companies.field_logo + - image.style.thumbnail + - node.type.companies + module: + - image + - link + - path + - text + enforced: + module: + - company +id: node.companies.default +targetEntityType: node +bundle: companies +mode: default +content: + body: + type: text_textarea_with_summary + weight: 9 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_company_link: + weight: 10 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_logo: + weight: 8 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml new file mode 100644 index 0000000..0f620cf --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.default.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.companies.body + - field.field.node.companies.field_company_link + - field.field.node.companies.field_logo + - node.type.companies + module: + - image + - link + - text + - user + enforced: + module: + - company +id: node.companies.default +targetEntityType: node +bundle: companies +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_company_link: + weight: 3 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_logo: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml new file mode 100644 index 0000000..8a0b84a --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_display.node.companies.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.companies.body + - node.type.companies + module: + - text + - user + enforced: + module: + - company +id: node.companies.teaser +targetEntityType: node +bundle: companies +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..6114f1f --- /dev/null +++ b/modules/bhavika/company/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - company +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/company/config/install/field.field.node.companies.body.yml b/modules/bhavika/company/config/install/field.field.node.companies.body.yml new file mode 100644 index 0000000..47c8791 --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.companies + module: + - text + enforced: + module: + - company +id: node.companies.body +field_name: body +entity_type: node +bundle: companies +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml b/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml new file mode 100644 index 0000000..f10a0ea --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.field_company_link.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_link + - node.type.companies + module: + - link + enforced: + module: + - company +id: node.companies.field_company_link +field_name: field_company_link +entity_type: node +bundle: companies +label: company_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml b/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml new file mode 100644 index 0000000..f1df5b8 --- /dev/null +++ b/modules/bhavika/company/config/install/field.field.node.companies.field_logo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_logo + - node.type.companies + module: + - image + enforced: + module: + - company +id: node.companies.field_logo +field_name: field_logo +entity_type: node +bundle: companies +label: logo +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: company + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/company/config/install/field.storage.node.body.yml b/modules/bhavika/company/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..e9f95b6 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text + enforced: + module: + - company +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml b/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml new file mode 100644 index 0000000..e5072b2 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.field_company_link.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - company +id: node.field_company_link +field_name: field_company_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/company/config/install/field.storage.node.field_logo.yml b/modules/bhavika/company/config/install/field.storage.node.field_logo.yml new file mode 100644 index 0000000..a62c720 --- /dev/null +++ b/modules/bhavika/company/config/install/field.storage.node.field_logo.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node +# third_party_settings: +# field_permissions: +# permission_type: public +enforced: + module: + - company +id: node.field_logo +field_name: field_logo +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/company/config/install/image.style.thumbnail.yml b/modules/bhavika/company/config/install/image.style.thumbnail.yml new file mode 100644 index 0000000..946d0cd --- /dev/null +++ b/modules/bhavika/company/config/install/image.style.thumbnail.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - company +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/bhavika/company/config/install/migrate_plus.migration.company_import.yml b/modules/bhavika/company/config/install/migrate_plus.migration.company_import.yml new file mode 100644 index 0000000..25ebd55 --- /dev/null +++ b/modules/bhavika/company/config/install/migrate_plus.migration.company_import.yml @@ -0,0 +1,50 @@ +uuid: 1141ae0c-c5ac-4b8a-87a0-5a42d2504519 +language: en +migration_group: default +id: company_import +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'company_import' +source: + plugin: csv + path: /var/www/companies/csv files/company.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/companies/images + file_dest: 'public://company/' +process: + type: + plugin: default_value + default_value: companies + source_path: + - + plugin: skip_on_empty + method: process + source: logo + - + plugin: concat + delimiter: / + source: + - constants/file_source + - logo + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_company_link: link + field_logo: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: companies +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/company/config/install/node.type.companies.yml b/modules/bhavika/company/config/install/node.type.companies.yml new file mode 100644 index 0000000..7552b9e --- /dev/null +++ b/modules/bhavika/company/config/install/node.type.companies.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - company +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Companies +type: companies +description: 'This is the content template for the various companies that visit L.D.C.E for Placements.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/company/src/Controller/CompanyController.php b/modules/bhavika/company/src/Controller/CompanyController.php new file mode 100644 index 0000000..3d0956d --- /dev/null +++ b/modules/bhavika/company/src/Controller/CompanyController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\company\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class CompanyController. + */ +class CompanyController extends ControllerBase { + + /** + * Company. + * + * @return string + * Return Hello string. + */ + public function company() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: company') + ]; + } + +} diff --git a/modules/bhavika/company/templates/company.html.twig b/modules/bhavika/company/templates/company.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/company/templates/company.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/company/tests/Controller/CompanyControllerTest.php b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php new file mode 100644 index 0000000..66debed --- /dev/null +++ b/modules/bhavika/company/tests/Controller/CompanyControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\company\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the company module. + */ +class CompanyControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "company CompanyController's controller functionality", + 'description' => 'Test Unit for module company and controller CompanyController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests company functionality. + */ + public function testCompanyController() { + // Check that the basic functions of module company. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/company/tests/src/Functional/LoadTest.php b/modules/bhavika/company/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..15e82ca --- /dev/null +++ b/modules/bhavika/company/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\company\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group company + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['company']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/department/composer.json b/modules/bhavika/department/composer.json new file mode 100644 index 0000000..a25a506 --- /dev/null +++ b/modules/bhavika/department/composer.json @@ -0,0 +1,13 @@ +{ + "name": "department", + "type": "drupal-module", + "description": "Department module is for department content type", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/department", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/department", + "source": "http://cgit.drupalcode.org/department", + }, +} diff --git a/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml b/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml new file mode 100644 index 0000000..bfaccb6 --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_form_display.node.department.default.yml @@ -0,0 +1,125 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - field.field.node.department.field_dept_image + - field.field.node.department.field_dept_mission + - field.field.node.department.field_facilities + - field.field.node.department.field_placements + - image.style.thumbnail + - node.type.department + module: + - image + - path + - text + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +mode: default +content: + body: + type: text_textarea_with_summary + weight: 8 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_dept_image: + weight: 9 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_dept_mission: + weight: 12 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_facilities: + weight: 10 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_placements: + weight: 13 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml b/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml new file mode 100644 index 0000000..cfff6fc --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_display.node.department.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.department.body + - field.field.node.department.field_dept_image + - field.field.node.department.field_dept_mission + - field.field.node.department.field_facilities + - field.field.node.department.field_placements + - node.type.department + module: + - image + - text + - user + enforced: + module: + - department +id: node.department.default +targetEntityType: node +bundle: department +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_dept_image: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_dept_mission: + weight: 5 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_facilities: + weight: 3 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_placements: + weight: 6 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml b/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml new file mode 100644 index 0000000..28c59d7 --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_display.node.department.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.department.body + - node.type.department + module: + - text + - user + enforced: + module: + - department +id: node.department.teaser +targetEntityType: node +bundle: department +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..22f411b --- /dev/null +++ b/modules/bhavika/department/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - department +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/department/config/install/field.field.node.department.body.yml b/modules/bhavika/department/config/install/field.field.node.department.body.yml new file mode 100644 index 0000000..fb7688f --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.body +field_name: body +entity_type: node +bundle: department +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml b/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml new file mode 100644 index 0000000..02ffffd --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_dept_image.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_dept_image + - node.type.department + module: + - image + enforced: + module: + - department +id: node.department.field_dept_image +field_name: field_dept_image +entity_type: node +bundle: department +label: dept_image +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: department + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml b/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml new file mode 100644 index 0000000..a49ab2d --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_dept_mission.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_dept_mission + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.field_dept_mission +field_name: field_dept_mission +entity_type: node +bundle: department +label: dept_mission +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml b/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml new file mode 100644 index 0000000..24c2776 --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_facilities.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facilities + - node.type.department + module: + - text + enforced: + module: + - department +id: node.department.field_facilities +field_name: field_facilities +entity_type: node +bundle: department +label: facilities +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml b/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml new file mode 100644 index 0000000..b242908 --- /dev/null +++ b/modules/bhavika/department/config/install/field.field.node.department.field_placements.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_placements + - node.type.companies + - node.type.department + enforced: + module: + - department + - company +id: node.department.field_placements +field_name: field_placements +entity_type: node +bundle: department +label: placements +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + companies: companies + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/department/config/install/field.storage.node.body.yml b/modules/bhavika/department/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..1d190e7 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - department +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml b/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml new file mode 100644 index 0000000..23ef815 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_dept_image.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + - department +id: node.field_dept_image +field_name: field_dept_image +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml b/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml new file mode 100644 index 0000000..031ec1f --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_dept_mission.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - department +id: node.field_dept_mission +field_name: field_dept_mission +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml b/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml new file mode 100644 index 0000000..3900da7 --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_facilities.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + - text + enforced: + module: + - department +id: node.field_facilities +field_name: field_facilities +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/field.storage.node.field_placements.yml b/modules/bhavika/department/config/install/field.storage.node.field_placements.yml new file mode 100644 index 0000000..42483fb --- /dev/null +++ b/modules/bhavika/department/config/install/field.storage.node.field_placements.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - department +id: node.field_placements +field_name: field_placements +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/department/config/install/image.style.thumbnail.yml b/modules/bhavika/department/config/install/image.style.thumbnail.yml new file mode 100644 index 0000000..2eda95b --- /dev/null +++ b/modules/bhavika/department/config/install/image.style.thumbnail.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - department +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/bhavika/department/config/install/migrate_plus.migration.department_import.yml b/modules/bhavika/department/config/install/migrate_plus.migration.department_import.yml new file mode 100644 index 0000000..a4d03ca --- /dev/null +++ b/modules/bhavika/department/config/install/migrate_plus.migration.department_import.yml @@ -0,0 +1,57 @@ +uuid: 5ce25402-34a6-46ee-aeef-3920e2cd0cb6 +language: en +migration_group: default +id: department_import +class: null +field_plugin_method: null +cck_plugin_method: null +label: 'department_import' +source: + plugin: csv + path: /var/www/Department/csv files/department.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/Department/image + file_dest: 'public://department/' +process: + type: + plugin: default_value + default_value: department + source_path: + - + plugin: skip_on_empty + method: process + source: img + - + plugin: concat + delimiter: / + source: + - constants/file_source + - img + title: title + body/value: body + body/format: + plugin: default_value + default_value: full_html + field_dept_image: + plugin: file_import + source: '@source_path' + destination: constants/file_dest + field_dept_mission: mission + field_facilities/value: facilities + field_placements: + - + plugin: entity_lookup + entity_type: node + bundle: companies + source: placements +destination: + plugin: 'entity:node' + bundle: department +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/department/config/install/node.type.companies.yml b/modules/bhavika/department/config/install/node.type.companies.yml new file mode 100644 index 0000000..6c8b80c --- /dev/null +++ b/modules/bhavika/department/config/install/node.type.companies.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - department +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Companies +type: companies +description: 'This is the content template for the various companies that visit L.D.C.E for Placements.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/department/config/install/node.type.department.yml b/modules/bhavika/department/config/install/node.type.department.yml new file mode 100644 index 0000000..4337ba1 --- /dev/null +++ b/modules/bhavika/department/config/install/node.type.department.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - department +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: Department +type: department +description: 'This content type provides the information about the various department of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/department/department.info.yml b/modules/bhavika/department/department.info.yml new file mode 100644 index 0000000..50cb4df --- /dev/null +++ b/modules/bhavika/department/department.info.yml @@ -0,0 +1,18 @@ +name: department +type: module +description: 'Department module is for department content type' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:image + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - drupal:file + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/department/department.install b/modules/bhavika/department/department.install new file mode 100644 index 0000000..7ea1cea --- /dev/null +++ b/modules/bhavika/department/department.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function department_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'department'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/department/department.module b/modules/bhavika/department/department.module new file mode 100644 index 0000000..5d0dd00 --- /dev/null +++ b/modules/bhavika/department/department.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains department.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function department_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the department module. + case 'help.page.department': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Department module is for department content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function department_theme() { + return [ + 'department' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/department/department.routing.yml b/modules/bhavika/department/department.routing.yml new file mode 100644 index 0000000..37f6dea --- /dev/null +++ b/modules/bhavika/department/department.routing.yml @@ -0,0 +1,8 @@ + +department.department_controller_department: + path: '/department_' + defaults: + _controller: '\Drupal\department\Controller\DepartmentController::department' + _title: 'Department Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/department/src/Controller/DepartmentController.php b/modules/bhavika/department/src/Controller/DepartmentController.php new file mode 100644 index 0000000..58741f3 --- /dev/null +++ b/modules/bhavika/department/src/Controller/DepartmentController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\department\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class DepartmentController. + */ +class DepartmentController extends ControllerBase { + + /** + * Department. + * + * @return string + * Return Hello string. + */ + public function department() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: department') + ]; + } + +} diff --git a/modules/bhavika/department/templates/department.html.twig b/modules/bhavika/department/templates/department.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/department/templates/department.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php b/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php new file mode 100644 index 0000000..8d7a0be --- /dev/null +++ b/modules/bhavika/department/tests/Controller/DepartmentControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\department\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the department module. + */ +class DepartmentControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "department DepartmentController's controller functionality", + 'description' => 'Test Unit for module department and controller DepartmentController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests department functionality. + */ + public function testDepartmentController() { + // Check that the basic functions of module department. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/department/tests/src/Functional/LoadTest.php b/modules/bhavika/department/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..423abc0 --- /dev/null +++ b/modules/bhavika/department/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\department\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group department + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['department']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json b/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json new file mode 100644 index 0000000..8ba55be --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/composer.json @@ -0,0 +1,13 @@ +{ + "name": "l_d_c_e_imp_pdf_links", + "type": "drupal-module", + "description": "This module is for important links that will be provided on site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/l_d_c_e_imp_pdf_links", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/l_d_c_e_imp_pdf_links", + "source": "http://cgit.drupalcode.org/l_d_c_e_imp_pdf_links", + }, +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml new file mode 100644 index 0000000..92cc86f --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_form_display.node.l_d_c_e_imp_pdf_links.default.yml @@ -0,0 +1,108 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.l_d_c_e_imp_pdf_links.body + - field.field.node.l_d_c_e_imp_pdf_links.field_file_type + - field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + module: + - paragraphs + - path + - text + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.default +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: default +content: + body: + weight: 124 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_file_type: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_pdf_file_para: + type: entity_reference_paragraphs + weight: 123 + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + third_party_settings: { } + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml new file mode 100644 index 0000000..7ec2eb7 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.default.yml @@ -0,0 +1,37 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.l_d_c_e_imp_pdf_links.body + - field.field.node.l_d_c_e_imp_pdf_links.field_file_type + - field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + module: + - entity_reference_revisions + - user + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.default +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: default +content: + field_pdf_file_para: + type: entity_reference_revisions_entity_view + weight: 1 + label: hidden + settings: + view_mode: default + link: '' + third_party_settings: { } + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + body: true + field_file_type: true + langcode: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml new file mode 100644 index 0000000..ee2b957 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/core.entity_view_display.node.l_d_c_e_imp_pdf_links.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.l_d_c_e_imp_pdf_links + module: + - user + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.teaser +targetEntityType: node +bundle: l_d_c_e_imp_pdf_links +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml new file mode 100644 index 0000000..e7d68ec --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.l_d_c_e_imp_pdf_links + module: + - text + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.body +field_name: body +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml new file mode 100644 index 0000000..d492e4b --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_file_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_file_type + - node.type.l_d_c_e_imp_pdf_links + - taxonomy.vocabulary.academics_category + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.field_file_type +field_name: field_file_type +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: file_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + academics_category: academics_category + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml new file mode 100644 index 0000000..63b18af --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.field.node.l_d_c_e_imp_pdf_links.field_pdf_file_para.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file_para + - node.type.l_d_c_e_imp_pdf_links + - paragraphs.paragraphs_type.imp_links + module: + - entity_reference_revisions + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.l_d_c_e_imp_pdf_links.field_pdf_file_para +field_name: field_pdf_file_para +entity_type: node +bundle: l_d_c_e_imp_pdf_links +label: pdf_file_para +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + imp_links: imp_links + target_bundles_drag_drop: + imp_links: + enabled: true + weight: 3 + r_d_projects: + weight: 4 + enabled: false +field_type: entity_reference_revisions diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml new file mode 100644 index 0000000..bacb030 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_file_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.field_file_type +field_name: field_file_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml new file mode 100644 index 0000000..19bf2a6 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/field.storage.node.field_pdf_file_para.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + module: + - entity_reference_revisions + - node + - paragraphs + enforced: + module: + - l_d_c_e_imp_pdf_links +id: node.field_pdf_file_para +field_name: field_pdf_file_para +entity_type: node +type: entity_reference_revisions +settings: + target_type: paragraph +module: entity_reference_revisions +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml new file mode 100644 index 0000000..1dd7631 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/node.type.l_d_c_e_imp_pdf_links.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - l_d_c_e_imp_pdf_links +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'L.D.C.E imp PDF Links' +type: l_d_c_e_imp_pdf_links +description: 'This content type provides template for the representation of various useful links of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml new file mode 100644 index 0000000..20bc8a3 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/paragraphs.paragraphs_type.imp_links.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - l_d_c_e_imp_pdf_links +id: imp_links +label: imp_links +icon_uuid: null +description: '' +behavior_plugins: { } diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml new file mode 100644 index 0000000..186be64 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/config/install/taxonomy.vocabulary.academics_category.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - l_d_c_e_imp_pdf_links +name: 'academics category' +vid: academics_category +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml new file mode 100644 index 0000000..d7d613b --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.info.yml @@ -0,0 +1,18 @@ +name: l_d_c_e_imp_pdf_links +type: module +description: 'This module is for important links that will be provided on site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:paragraphs + - drupal:entity_reference_revisions + - drupal:text + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install new file mode 100644 index 0000000..3f81231 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function l_d_c_e_imp_pdf_links_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'l_d_c_e_imp_pdf_links'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module new file mode 100644 index 0000000..82a0bbb --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains l_d_c_e_imp_pdf_links.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function l_d_c_e_imp_pdf_links_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the l_d_c_e_imp_pdf_links module. + case 'help.page.l_d_c_e_imp_pdf_links': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for important links that will be provided on site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function l_d_c_e_imp_pdf_links_theme() { + return [ + 'l_d_c_e_imp_pdf_links' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml new file mode 100644 index 0000000..da34b86 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/l_d_c_e_imp_pdf_links.routing.yml @@ -0,0 +1,8 @@ + +l_d_c_e_imp_pdf_links.pdf_links_controller_ldce_imp_pdf_links: + path: '/l_d_c_e_imp_pdf_links' + defaults: + _controller: '\Drupal\l_d_c_e_imp_pdf_links\Controller\PdfLinksController::ldce_imp_pdf_links' + _title: 'LDCE Link Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php b/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php new file mode 100644 index 0000000..20ed573 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/src/Controller/PdfLinksController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\l_d_c_e_imp_pdf_links\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class PdfLinksController. + */ +class PdfLinksController extends ControllerBase { + + /** + * Ldce_imp_pdf_links. + * + * @return string + * Return Hello string. + */ + public function ldce_imp_pdf_links() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: ldce_imp_pdf_links') + ]; + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig b/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/templates/l-d-c-e-imp-pdf-links.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php new file mode 100644 index 0000000..8a4bfe1 --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/Controller/PdfLinksControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\l_d_c_e_imp_pdf_links\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the l_d_c_e_imp_pdf_links module. + */ +class PdfLinksControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "l_d_c_e_imp_pdf_links PdfLinksController's controller functionality", + 'description' => 'Test Unit for module l_d_c_e_imp_pdf_links and controller PdfLinksController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests l_d_c_e_imp_pdf_links functionality. + */ + public function testPdfLinksController() { + // Check that the basic functions of module l_d_c_e_imp_pdf_links. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..a5cf71d --- /dev/null +++ b/modules/bhavika/l_d_c_e_imp_pdf_links/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\l_d_c_e_imp_pdf_links\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group l_d_c_e_imp_pdf_links + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['l_d_c_e_imp_pdf_links']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/legal_forms/composer.json b/modules/bhavika/legal_forms/composer.json new file mode 100644 index 0000000..ff7c339 --- /dev/null +++ b/modules/bhavika/legal_forms/composer.json @@ -0,0 +1,13 @@ +{ + "name": "legal_forms", + "type": "drupal-module", + "description": "Legal forms module is for various legal forms of site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/legal_forms", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/legal_forms", + "source": "http://cgit.drupalcode.org/legal_forms", + }, +} diff --git a/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml new file mode 100644 index 0000000..bd22038 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_form_display.node.legal_forms.default.yml @@ -0,0 +1,103 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - path + - text + enforced: + module: + -legal_forms +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_form_type: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + field_pdf_file: + weight: 8 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml new file mode 100644 index 0000000..f7d793b --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.default.yml @@ -0,0 +1,43 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - text + - user + enforced: + module: + -legal_forms +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 2 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_pdf_file: + weight: 1 + label: hidden + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_form_type: true + langcode: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml new file mode 100644 index 0000000..631d77d --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.node.legal_forms.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - user + enforced: + module: + -legal_forms +id: node.legal_forms.teaser +targetEntityType: node +bundle: legal_forms +mode: teaser +content: { } +hidden: + field_form_type: true + field_pdf_file: true + langcode: true + links: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml new file mode 100644 index 0000000..5b92a0b --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml @@ -0,0 +1,16 @@ +langcode: en +status: true +dependencies: + config: + - taxonomy.vocabulary.legal_forms + enforced: + module: + -legal_forms +id: taxonomy_term.legal_forms.default +targetEntityType: taxonomy_term +bundle: legal_forms +mode: default +content: { } +hidden: + description: true + langcode: true diff --git a/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml b/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml new file mode 100644 index 0000000..8935f55 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/core.entity_view_mode.node.teaser.yml @@ -0,0 +1,12 @@ +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + -legal_forms +id: node.teaser +label: Teaser +targetEntityType: node +cache: true diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml new file mode 100644 index 0000000..f0007d4 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.legal_forms + module: + - text + enforced: + module: + -legal_forms +id: node.legal_forms.body +field_name: body +entity_type: node +bundle: legal_forms +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml new file mode 100644 index 0000000..f124463 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_form_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_form_type + - node.type.legal_forms + - taxonomy.vocabulary.legal_forms + enforced: + module: + -legal_forms +id: node.legal_forms.field_form_type +field_name: field_form_type +entity_type: node +bundle: legal_forms +label: form_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + legal_forms: legal_forms + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: academics_category +field_type: entity_reference diff --git a/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml new file mode 100644 index 0000000..3903ebf --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.field.node.legal_forms.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file + - node.type.legal_forms + module: + - file + enforced: + module: + -legal_forms +id: node.legal_forms.field_pdf_file +field_name: field_pdf_file +entity_type: node +bundle: legal_forms +label: pdf_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: pdf_files_lf + file_extensions: 'txt pdf jpg png zip' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml new file mode 100644 index 0000000..7a1b3a3 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - node + - text +# third_party_settings: +# field_permissions: +# permission_type: public + enforced: + module: + -legal_forms +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml new file mode 100644 index 0000000..ce581b6 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.field_form_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + -legal_forms +id: node.field_form_type +field_name: field_form_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml b/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml new file mode 100644 index 0000000..ea2949c --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/field.storage.node.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - node + enforced: + module: + -legal_forms +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_pdf_file +field_name: field_pdf_file +entity_type: node +type: file +settings: + display_field: false + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml b/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml new file mode 100644 index 0000000..48507e3 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/migrate_plus.migration.legal_forms_import.yml @@ -0,0 +1,57 @@ +uuid: 5098d90e-b0d2-4895-9643-c1c6f62ab657 +language: en +migration_group: default +id: legal_forms_import +label: 'legal_forms_import' +source: + plugin: csv + path: /var/www/legal forms/csv/legal_forms.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/legal forms/files + file_dest: 'public://pdf_files_lf/' +process: + type: + plugin: default_value + default_value: legal_forms + source_path: + - + plugin: skip_on_empty + method: process + source: files + - + plugin: concat + delimiter: / + source: + - constants/file_source + - files + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_form_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: legal_forms + source: form_type + field_pdf_file: + - + plugin: explode + delimiter: ',' + source: files + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: legal_forms +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml b/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml new file mode 100644 index 0000000..2935757 --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/node.type.legal_forms.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + -legal_forms +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Legal Forms' +type: legal_forms +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml b/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml new file mode 100644 index 0000000..73217ee --- /dev/null +++ b/modules/bhavika/legal_forms/config/install/taxonomy.vocabulary.legal_forms.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + -legal_forms +name: legal_forms +vid: legal_forms +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/legal_forms/legal_forms.info.yml b/modules/bhavika/legal_forms/legal_forms.info.yml new file mode 100644 index 0000000..290a389 --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.info.yml @@ -0,0 +1,17 @@ +name: legal_forms +type: module +description: 'Legal forms module is for various legal forms of site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - drupal:file + # - ds:ds + # - pathauto:pathauto + diff --git a/modules/bhavika/legal_forms/legal_forms.module b/modules/bhavika/legal_forms/legal_forms.module new file mode 100644 index 0000000..b4d6b12 --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains legal_forms.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function legal_forms_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the legal_forms module. + case 'help.page.legal_forms': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Legal forms module is for various legal forms of site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function legal_forms_theme() { + return [ + 'legal_forms' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/legal_forms/legal_forms.routing.yml b/modules/bhavika/legal_forms/legal_forms.routing.yml new file mode 100644 index 0000000..fdae3eb --- /dev/null +++ b/modules/bhavika/legal_forms/legal_forms.routing.yml @@ -0,0 +1,8 @@ + +legal_forms.legal_forms_controller_legal_forms: + path: '/legal_forms' + defaults: + _controller: '\Drupal\legal_forms\Controller\LegalFormsController::legal_forms' + _title: 'Legal Forms Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php b/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php new file mode 100644 index 0000000..65829c6 --- /dev/null +++ b/modules/bhavika/legal_forms/src/Controller/LegalFormsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\legal_forms\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class LegalFormsController. + */ +class LegalFormsController extends ControllerBase { + + /** + * Legal_forms. + * + * @return string + * Return Hello string. + */ + public function legal_forms() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: legal_forms') + ]; + } + +} diff --git a/modules/bhavika/legal_forms/templates/legal-forms.html.twig b/modules/bhavika/legal_forms/templates/legal-forms.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/legal_forms/templates/legal-forms.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php b/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php new file mode 100644 index 0000000..c99135a --- /dev/null +++ b/modules/bhavika/legal_forms/tests/Controller/LegalFormsControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\legal_forms\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the legal_forms module. + */ +class LegalFormsControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "legal_forms LegalFormsController's controller functionality", + 'description' => 'Test Unit for module legal_forms and controller LegalFormsController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests legal_forms functionality. + */ + public function testLegalFormsController() { + // Check that the basic functions of module legal_forms. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php b/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..23c5583 --- /dev/null +++ b/modules/bhavika/legal_forms/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\legal_forms\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group legal_forms + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['legal_forms']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/legal_forms1/composer.json b/modules/bhavika/legal_forms1/composer.json new file mode 100644 index 0000000..f9a3de8 --- /dev/null +++ b/modules/bhavika/legal_forms1/composer.json @@ -0,0 +1,13 @@ +{ + "name": "legal_forms1", + "type": "drupal-module", + "description": "Legal forms is module for forms of site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/legal_forms1", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/legal_forms1", + "source": "http://cgit.drupalcode.org/legal_forms1", + }, +} diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml new file mode 100644 index 0000000..0a931fe --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_form_display.node.legal_forms.default.yml @@ -0,0 +1,103 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - path + - text + enforced: + module: + - legal_forms1 +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_form_type: + type: entity_reference_autocomplete + weight: 9 + region: content + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + field_pdf_file: + weight: 8 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml new file mode 100644 index 0000000..98a37b8 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.default.yml @@ -0,0 +1,43 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.legal_forms.body + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - file + - text + - user + enforced: + module: + - legal_forms1 +id: node.legal_forms.default +targetEntityType: node +bundle: legal_forms +mode: default +content: + body: + weight: 2 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_pdf_file: + weight: 1 + label: hidden + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + field_form_type: true + langcode: true diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml new file mode 100644 index 0000000..7bcb82f --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.node.legal_forms.teaser.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.legal_forms.field_form_type + - field.field.node.legal_forms.field_pdf_file + - node.type.legal_forms + module: + - user + enforced: + module: + - legal_forms1 +id: node.legal_forms.teaser +targetEntityType: node +bundle: legal_forms +mode: teaser +content: { } +hidden: + field_form_type: true + field_pdf_file: true + langcode: true + links: true diff --git a/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml new file mode 100644 index 0000000..ecdeb34 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/core.entity_view_display.taxonomy_term.legal_forms.default.yml @@ -0,0 +1,16 @@ +langcode: en +status: true +dependencies: + config: + - taxonomy.vocabulary.legal_forms + enforced: + module: + - legal_forms1 +id: taxonomy_term.legal_forms.default +targetEntityType: taxonomy_term +bundle: legal_forms +mode: default +content: { } +hidden: + description: true + langcode: true diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml new file mode 100644 index 0000000..ca37815 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.legal_forms + module: + - text + enforced: + module: + - legal_forms1 +id: node.legal_forms.body +field_name: body +entity_type: node +bundle: legal_forms +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml new file mode 100644 index 0000000..f07a9df --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_form_type.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_form_type + - node.type.legal_forms + - taxonomy.vocabulary.legal_forms + enforced: + module: + - legal_forms1 +id: node.legal_forms.field_form_type +field_name: field_form_type +entity_type: node +bundle: legal_forms +label: form_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + legal_forms: legal_forms + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: academics_category +field_type: entity_reference diff --git a/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml new file mode 100644 index 0000000..8a4bfd2 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.field.node.legal_forms.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_pdf_file + - node.type.legal_forms + module: + - file + enforced: + module: + - legal_forms1 +id: node.legal_forms.field_pdf_file +field_name: field_pdf_file +entity_type: node +bundle: legal_forms +label: pdf_file +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: pdf_files_lf + file_extensions: 'txt pdf jpg png zip' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml new file mode 100644 index 0000000..2b6d88d --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_form_type.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - legal_forms1 +id: node.field_form_type +field_name: field_form_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml new file mode 100644 index 0000000..bacd3db --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/field.storage.node.field_pdf_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - node + enforced: + module: + - legal_forms1 +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_pdf_file +field_name: field_pdf_file +entity_type: node +type: file +settings: + display_field: false + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml b/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml new file mode 100644 index 0000000..48507e3 --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/migrate_plus.migration.legal_forms_import.yml @@ -0,0 +1,57 @@ +uuid: 5098d90e-b0d2-4895-9643-c1c6f62ab657 +language: en +migration_group: default +id: legal_forms_import +label: 'legal_forms_import' +source: + plugin: csv + path: /var/www/legal forms/csv/legal_forms.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/legal forms/files + file_dest: 'public://pdf_files_lf/' +process: + type: + plugin: default_value + default_value: legal_forms + source_path: + - + plugin: skip_on_empty + method: process + source: files + - + plugin: concat + delimiter: / + source: + - constants/file_source + - files + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_form_type: + - + plugin: entity_lookup + entity_type: taxonomy_term + bundle: legal_forms + source: form_type + field_pdf_file: + - + plugin: explode + delimiter: ',' + source: files + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: legal_forms +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml b/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml new file mode 100644 index 0000000..0b37dcb --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/node.type.legal_forms.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - legal_forms1 +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Legal Forms' +type: legal_forms +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml b/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml new file mode 100644 index 0000000..637fa3c --- /dev/null +++ b/modules/bhavika/legal_forms1/config/install/taxonomy.vocabulary.legal_forms.yml @@ -0,0 +1,8 @@ +langcode: en +status: true +dependencies: { } +name: legal_forms +vid: legal_forms +description: '' +hierarchy: 0 +weight: 0 diff --git a/modules/bhavika/legal_forms1/legal_forms1.info.yml b/modules/bhavika/legal_forms1/legal_forms1.info.yml new file mode 100644 index 0000000..9ab3562 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.info.yml @@ -0,0 +1,17 @@ +name: legal_forms1 +type: module +description: 'Legal forms is module for forms of site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/legal_forms1/legal_forms1.install b/modules/bhavika/legal_forms1/legal_forms1.install new file mode 100644 index 0000000..794dd6f --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function legal_forms1_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'legal_forms'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/legal_forms1/legal_forms1.module b/modules/bhavika/legal_forms1/legal_forms1.module new file mode 100644 index 0000000..b3621f3 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains legal_forms1.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function legal_forms1_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the legal_forms1 module. + case 'help.page.legal_forms1': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Legal forms is module for forms of site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function legal_forms1_theme() { + return [ + 'legal_forms1' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/legal_forms1/legal_forms1.routing.yml b/modules/bhavika/legal_forms1/legal_forms1.routing.yml new file mode 100644 index 0000000..6007e60 --- /dev/null +++ b/modules/bhavika/legal_forms1/legal_forms1.routing.yml @@ -0,0 +1,8 @@ + +legal_forms1.legal_forms_controller_legalforms: + path: '/legal_forms1' + defaults: + _controller: '\Drupal\legal_forms1\Controller\LegalFormsController::legalforms' + _title: 'legalforms' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php b/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php new file mode 100644 index 0000000..4f74371 --- /dev/null +++ b/modules/bhavika/legal_forms1/src/Controller/LegalFormsController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\legal_forms1\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class LegalFormsController. + */ +class LegalFormsController extends ControllerBase { + + /** + * Legalforms. + * + * @return string + * Return Hello string. + */ + public function legalforms() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: legalforms') + ]; + } + +} diff --git a/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig b/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/legal_forms1/templates/legal-forms1.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php b/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php new file mode 100644 index 0000000..37eb9ce --- /dev/null +++ b/modules/bhavika/legal_forms1/tests/Controller/LegalFormsControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\legal_forms1\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the legal_forms1 module. + */ +class LegalFormsControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "legal_forms1 LegalFormsController's controller functionality", + 'description' => 'Test Unit for module legal_forms1 and controller LegalFormsController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests legal_forms1 functionality. + */ + public function testLegalFormsController() { + // Check that the basic functions of module legal_forms1. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php b/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..530fa33 --- /dev/null +++ b/modules/bhavika/legal_forms1/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\legal_forms1\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group legal_forms1 + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['legal_forms1']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/photo_gallery/composer.json b/modules/bhavika/photo_gallery/composer.json new file mode 100644 index 0000000..4e0d603 --- /dev/null +++ b/modules/bhavika/photo_gallery/composer.json @@ -0,0 +1,13 @@ +{ + "name": "photo_gallery", + "type": "drupal-module", + "description": "This module is for various pictures uploaded on site", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/photo_gallery", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/photo_gallery", + "source": "http://cgit.drupalcode.org/photo_gallery", + }, +} diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml b/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml new file mode 100644 index 0000000..494750a --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_form_display.node.photo_gallery.default.yml @@ -0,0 +1,52 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.photo_gallery.body + - field.field.node.photo_gallery.field_photo_gallery_img + - image.style.thumbnail + - node.type.photo_gallery + module: + - image + - text + enforced: + module: + - photo_gallery +id: node.photo_gallery.default +targetEntityType: node +bundle: photo_gallery +mode: default +content: + body: + weight: 26 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + type: text_textarea_with_summary + region: content + field_photo_gallery_img: + weight: 1 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + langcode: true + path: true + promote: true + status: true + sticky: true + uid: true diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml new file mode 100644 index 0000000..6cf56ae --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.default.yml @@ -0,0 +1,68 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.photo_gallery.body + - field.field.node.photo_gallery.field_photo_gallery_img + - node.type.photo_gallery + module: + - ds + - image + - text + - user + enforced: + module: + - photo_gallery +id: node.photo_gallery.default +targetEntityType: node +bundle: photo_gallery +mode: default +content: + body: + weight: 1 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_photo_gallery_img: + weight: 0 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: + ds: + ds_limit: '' + ft: + id: expert + settings: + lb: '' + prefix: '' + lbw-el: '' + lbw-cl: '' + lbw-at: '' + ow: true + ow-el: div + ow-cl: mb-10 + ow-at: '' + fis: true + fis-el: div + fis-cl: 'row col-sm-4' + fis-at: '' + fi-el: '' + fi-cl: '' + fi-at: '' + suffix: '' + lbw: false + lb-col: false + ow-def-at: false + ow-def-cl: false + fis-def-at: false + fi: false + fi-def-at: false + type: image + region: content +hidden: + langcode: true + links: true diff --git a/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml new file mode 100644 index 0000000..54960ee --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/core.entity_view_display.node.photo_gallery.teaser.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.photo_gallery.field_photo_gallery_img + - node.type.photo_gallery + module: + - user + enforced: + module: + - photo_gallery +id: node.photo_gallery.teaser +targetEntityType: node +bundle: photo_gallery +mode: teaser +content: { } +hidden: + field_photo_gallery_img: true + langcode: true + links: true diff --git a/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml new file mode 100644 index 0000000..b9fcc71 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.photo_gallery + module: + - text + enforced: + module: + - photo_gallery +id: node.photo_gallery.body +field_name: body +entity_type: node +bundle: photo_gallery +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: false +field_type: text_with_summary diff --git a/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml new file mode 100644 index 0000000..a3bc37f --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.field.node.photo_gallery.field_photo_gallery_img.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_photo_gallery_img + - node.type.photo_gallery + module: + - image + enforced: + module: + - photo_gallery +id: node.photo_gallery.field_photo_gallery_img +field_name: field_photo_gallery_img +entity_type: node +bundle: photo_gallery +label: photo_gallery_img +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: photogallery + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml b/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml new file mode 100644 index 0000000..5c16698 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/field.storage.node.field_photo_gallery_img.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + module: + # - field_permissions + - file + - image + - node + enforced: + module: + - photo_gallery +# third_party_settings: +# field_permissions: +# permission_type: public +id: node.field_photo_gallery_img +field_name: field_photo_gallery_img +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml b/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml new file mode 100644 index 0000000..636478a --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/migrate_plus.migration.photo_gallery_import.yml @@ -0,0 +1,51 @@ +uuid: 5eb7bd1c-4d96-4ff1-b6a0-c30d3bb141f0 +language: en +migration_group: default +id: photo_gallery_import +label: 'photo_gallery_import' +source: + plugin: csv + path: /var/www/photogallery/csv/pg.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/photogallery/images + file_dest: 'public://photo/' +process: + type: + plugin: default_value + default_value: photo_gallery + source_path: + - + plugin: skip_on_empty + method: process + source: image + - + plugin: concat + delimiter: / + source: + - constants/file_source + - image + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_photo_gallery_img: + - + plugin: explode + delimiter: ',' + source: image + - + plugin: file_import + # source: '@source_path' + destination: constants/file_dest +destination: + plugin: 'entity:node' + bundle: photo_gallery +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml b/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml new file mode 100644 index 0000000..f666180 --- /dev/null +++ b/modules/bhavika/photo_gallery/config/install/node.type.photo_gallery.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - photo_gallery +# third_party_settings: +# menu_ui: +# available_menus: +# - main +# parent: 'main:' +name: 'Photo Gallery' +type: photo_gallery +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/photo_gallery/photo_gallery.info.yml b/modules/bhavika/photo_gallery/photo_gallery.info.yml new file mode 100644 index 0000000..2cbcca6 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.info.yml @@ -0,0 +1,18 @@ +name: photo_gallery +type: module +description: 'This module is for various pictures uploaded on site' +core: 8.x +package: Custom +dependencies: + - drupal:node + - drupal:text + - drupal:image + - drupal:file + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:options + - drupal:path + - ds:ds + - pathauto:pathauto + diff --git a/modules/bhavika/photo_gallery/photo_gallery.install b/modules/bhavika/photo_gallery/photo_gallery.install new file mode 100644 index 0000000..4c95c95 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function photo_gallery_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'photo_gallert'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/photo_gallery/photo_gallery.module b/modules/bhavika/photo_gallery/photo_gallery.module new file mode 100644 index 0000000..17bce25 --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains photo_gallery.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function photo_gallery_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the photo_gallery module. + case 'help.page.photo_gallery': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module is for various pictures uploaded on site') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function photo_gallery_theme() { + return [ + 'photo_gallery' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/bhavika/photo_gallery/photo_gallery.routing.yml b/modules/bhavika/photo_gallery/photo_gallery.routing.yml new file mode 100644 index 0000000..cb0a3fb --- /dev/null +++ b/modules/bhavika/photo_gallery/photo_gallery.routing.yml @@ -0,0 +1,8 @@ + +photo_gallery.photo_gallery_controller_photo_gallery: + path: '/photo_gallery' + defaults: + _controller: '\Drupal\photo_gallery\Controller\PhotoGalleryController::photo_gallery' + _title: 'Photo Gallery Module' + requirements: + _permission: 'access content' diff --git a/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php b/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php new file mode 100644 index 0000000..02aca82 --- /dev/null +++ b/modules/bhavika/photo_gallery/src/Controller/PhotoGalleryController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\photo_gallery\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class PhotoGalleryController. + */ +class PhotoGalleryController extends ControllerBase { + + /** + * Photo_gallery. + * + * @return string + * Return Hello string. + */ + public function photo_gallery() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: photo_gallery') + ]; + } + +} diff --git a/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig b/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/photo_gallery/templates/photo-gallery.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php b/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php new file mode 100644 index 0000000..5dd8f26 --- /dev/null +++ b/modules/bhavika/photo_gallery/tests/Controller/PhotoGalleryControllerTest.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\photo_gallery\Tests; + +use Drupal\simpletest\WebTestBase; + +/** + * Provides automated tests for the photo_gallery module. + */ +class PhotoGalleryControllerTest extends WebTestBase { + + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return [ + 'name' => "photo_gallery PhotoGalleryController's controller functionality", + 'description' => 'Test Unit for module photo_gallery and controller PhotoGalleryController.', + 'group' => 'Other', + ]; + } + + /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + } + + /** + * Tests photo_gallery functionality. + */ + public function testPhotoGalleryController() { + // Check that the basic functions of module photo_gallery. + $this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.'); + } + +} diff --git a/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php b/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..dfe0211 --- /dev/null +++ b/modules/bhavika/photo_gallery/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\photo_gallery\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group photo_gallery + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['photo_gallery']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/welcome/composer.json b/modules/bhavika/welcome/composer.json new file mode 100644 index 0000000..e544b43 --- /dev/null +++ b/modules/bhavika/welcome/composer.json @@ -0,0 +1,13 @@ +{ + "name": "welcome", + "type": "drupal-module", + "description": "this module shows welcome message to logged in user.", + "keywords": [ + ], + "homepage": "https://www.drupal.org/project/welcome", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/welcome", + "source": "http://cgit.drupalcode.org/welcome", + }, +} diff --git a/modules/bhavika/welcome/config/install/core.entity_form_display.node.clubs.default.yml b/modules/bhavika/welcome/config/install/core.entity_form_display.node.clubs.default.yml new file mode 100644 index 0000000..a96619f --- /dev/null +++ b/modules/bhavika/welcome/config/install/core.entity_form_display.node.clubs.default.yml @@ -0,0 +1,168 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_activity_type + - field.field.node.clubs.field_contact_no + - field.field.node.clubs.field_email + - field.field.node.clubs.field_external_link + - field.field.node.clubs.field_facebook_link + - field.field.node.clubs.field_img + - field.field.node.clubs.field_instagram_link + - field.field.node.clubs.field_twitter_link + - field.field.node.clubs.field_youtube_link + - image.style.thumbnail + - node.type.clubs + module: + - image + - link + - path + - text + enforced: + module: + - welcome +id: node.clubs.default +targetEntityType: node +bundle: clubs +mode: default +content: + body: + type: text_textarea_with_summary + weight: 9 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_activity_type: + weight: 33 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_contact_no: + weight: 27 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_email: + weight: 26 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: email_default + region: content + field_external_link: + weight: 32 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_facebook_link: + weight: 28 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_img: + weight: 8 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_instagram_link: + weight: 30 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_twitter_link: + weight: 29 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_youtube_link: + weight: 31 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.default.yml b/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.default.yml new file mode 100644 index 0000000..445adab --- /dev/null +++ b/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.default.yml @@ -0,0 +1,132 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.clubs.body + - field.field.node.clubs.field_activity_type + - field.field.node.clubs.field_contact_no + - field.field.node.clubs.field_email + - field.field.node.clubs.field_external_link + - field.field.node.clubs.field_facebook_link + - field.field.node.clubs.field_img + - field.field.node.clubs.field_instagram_link + - field.field.node.clubs.field_twitter_link + - field.field.node.clubs.field_youtube_link + - node.type.clubs + module: + - image + - link + - text + - user +id: node.clubs.default +targetEntityType: node +bundle: clubs +mode: default +content: + body: + label: hidden + type: text_default + weight: 2 + settings: { } + third_party_settings: { } + region: content + field_activity_type: + weight: 10 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_contact_no: + weight: 4 + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_email: + weight: 3 + label: above + settings: { } + third_party_settings: { } + type: basic_string + region: content + field_external_link: + weight: 9 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_facebook_link: + weight: 5 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_img: + weight: 1 + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_instagram_link: + weight: 7 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_twitter_link: + weight: 6 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_youtube_link: + weight: 8 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.teaser.yml b/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.teaser.yml new file mode 100644 index 0000000..fd4b1f4 --- /dev/null +++ b/modules/bhavika/welcome/config/install/core.entity_view_display.node.clubs.teaser.yml @@ -0,0 +1,41 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.clubs.body + - field.field.node.clubs.field_img + - node.type.clubs + module: + - image + - text + - user +id: node.clubs.teaser +targetEntityType: node +bundle: clubs +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 2 + settings: + trim_length: 600 + third_party_settings: { } + region: content + field_img: + type: image + weight: 1 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + links: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.body.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.body.yml new file mode 100644 index 0000000..e572069 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.body.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.clubs + module: + - text +id: node.clubs.body +field_name: body +entity_type: node +bundle: clubs +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_activity_type.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_activity_type.yml new file mode 100644 index 0000000..da66c52 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_activity_type.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_activity_type + - node.type.clubs +id: node.clubs.field_activity_type +field_name: field_activity_type +entity_type: node +bundle: clubs +label: activity_type +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: { } +field_type: entity_reference diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_contact_no.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_contact_no.yml new file mode 100644 index 0000000..28becd7 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_contact_no.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_contact_no + - node.type.clubs +id: node.clubs.field_contact_no +field_name: field_contact_no +entity_type: node +bundle: clubs +label: contact_no +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: null + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_email.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_email.yml new file mode 100644 index 0000000..a179d07 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_email.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_email + - node.type.clubs +id: node.clubs.field_email +field_name: field_email +entity_type: node +bundle: clubs +label: email +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: email diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_external_link.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_external_link.yml new file mode 100644 index 0000000..7962381 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_external_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_external_link + - node.type.clubs + module: + - link +id: node.clubs.field_external_link +field_name: field_external_link +entity_type: node +bundle: clubs +label: external_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_facebook_link.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_facebook_link.yml new file mode 100644 index 0000000..b15c13e --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_facebook_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_facebook_link + - node.type.clubs + module: + - link +id: node.clubs.field_facebook_link +field_name: field_facebook_link +entity_type: node +bundle: clubs +label: facebook_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_img.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_img.yml new file mode 100644 index 0000000..6588324 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_img.yml @@ -0,0 +1,37 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_img + - node.type.clubs + module: + - image +id: node.clubs.field_img +field_name: field_img +entity_type: node +bundle: clubs +label: img +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: clubs + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_instagram_link.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_instagram_link.yml new file mode 100644 index 0000000..502ff03 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_instagram_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_instagram_link + - node.type.clubs + module: + - link +id: node.clubs.field_instagram_link +field_name: field_instagram_link +entity_type: node +bundle: clubs +label: instagram_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_twitter_link.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_twitter_link.yml new file mode 100644 index 0000000..9ff6d67 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_twitter_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_twitter_link + - node.type.clubs + module: + - link +id: node.clubs.field_twitter_link +field_name: field_twitter_link +entity_type: node +bundle: clubs +label: twitter_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/welcome/config/install/field.field.node.clubs.field_youtube_link.yml b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_youtube_link.yml new file mode 100644 index 0000000..3948100 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.field.node.clubs.field_youtube_link.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_youtube_link + - node.type.clubs + module: + - link +id: node.clubs.field_youtube_link +field_name: field_youtube_link +entity_type: node +bundle: clubs +label: youtube_link +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_activity_type.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_activity_type.yml new file mode 100644 index 0000000..c6ed31c --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_activity_type.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: node.field_activity_type +field_name: field_activity_type +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_contact_no.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_contact_no.yml new file mode 100644 index 0000000..5529a2a --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_contact_no.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_contact_no +field_name: field_contact_no +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_email.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_email.yml new file mode 100644 index 0000000..b5af8b1 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_email.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_email +field_name: field_email +entity_type: node +type: email +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_external_link.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_external_link.yml new file mode 100644 index 0000000..1e6d9b3 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_external_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_external_link +field_name: field_external_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_facebook_link.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_facebook_link.yml new file mode 100644 index 0000000..d5ebe2f --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_facebook_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_facebook_link +field_name: field_facebook_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_img.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_img.yml new file mode 100644 index 0000000..db3dc12 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_img.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_img +field_name: field_img +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_instagram_link.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_instagram_link.yml new file mode 100644 index 0000000..4f826c7 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_instagram_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_instagram_link +field_name: field_instagram_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_twitter_link.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_twitter_link.yml new file mode 100644 index 0000000..d8ebe38 --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_twitter_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_twitter_link +field_name: field_twitter_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/field.storage.node.field_youtube_link.yml b/modules/bhavika/welcome/config/install/field.storage.node.field_youtube_link.yml new file mode 100644 index 0000000..30af03b --- /dev/null +++ b/modules/bhavika/welcome/config/install/field.storage.node.field_youtube_link.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_youtube_link +field_name: field_youtube_link +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/bhavika/welcome/config/install/node.type.clubs.yml b/modules/bhavika/welcome/config/install/node.type.clubs.yml new file mode 100644 index 0000000..81aad98 --- /dev/null +++ b/modules/bhavika/welcome/config/install/node.type.clubs.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Clubs +type: clubs +description: 'Different Clubs and sports clubs Of L.D.C.E' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/bhavika/welcome/src/Controller/WelcomeController.php b/modules/bhavika/welcome/src/Controller/WelcomeController.php new file mode 100644 index 0000000..067b08e --- /dev/null +++ b/modules/bhavika/welcome/src/Controller/WelcomeController.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\welcome\Controller; + +use Drupal\Core\Controller\ControllerBase; + +/** + * Class WelcomeController. + */ +class WelcomeController extends ControllerBase { + + /** + * Welcome. + * + * @return string + * Return Hello string. + */ + public function welcome() { + return [ + '#type' => 'markup', + '#markup' => $this->t('Implement method: welcome') + ]; + } + +} diff --git a/modules/bhavika/welcome/templates/welcome.html.twig b/modules/bhavika/welcome/templates/welcome.html.twig new file mode 100644 index 0000000..95722bd --- /dev/null +++ b/modules/bhavika/welcome/templates/welcome.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here --> diff --git a/modules/bhavika/welcome/tests/src/Functional/LoadTest.php b/modules/bhavika/welcome/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..caa6ac0 --- /dev/null +++ b/modules/bhavika/welcome/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\welcome\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group welcome + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['welcome']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} diff --git a/modules/bhavika/welcome/welcome.info.yml b/modules/bhavika/welcome/welcome.info.yml new file mode 100644 index 0000000..a705811 --- /dev/null +++ b/modules/bhavika/welcome/welcome.info.yml @@ -0,0 +1,41 @@ +name: 'welcome' +type: module +description: 'this module shows welcome message to logged in user.' +core: 8.x +package: 'Custom' +# dependencies: +# config: +# - field.field.node.clubs.body +# - field.field.node.clubs.field_activity_type +# - field.field.node.clubs.field_contact_no +# - field.field.node.clubs.field_email +# - field.field.node.clubs.field_external_link +# - field.field.node.clubs.field_facebook_link +# - field.field.node.clubs.field_img +# - field.field.node.clubs.field_instagram_link +# - field.field.node.clubs.field_twitter_link +# - field.field.node.clubs.field_youtube_link +# - image.style.thumbnail +# - field.storage.node.field_img +# - node.type.clubs +# - field.storage.node.body +# - field.storage.node.field_activity_type +# - field.storage.node.field_contact_no +# - field.storage.node.field_email +# - field.storage.node.field_external_link +# - field.storage.node.field_facebook_link +# - field.storage.node.field_instagram_link +# - field.storage.node.field_twitter_link +# - field.storage.node.field_youtube_link +# - core.entity_view_mode.node.teaser + +# module: +# - menu_ui +# - image +# - link +# - path +# - text +# - user +# - node +# - taxonomy +# - file diff --git a/modules/bhavika/welcome/welcome.install b/modules/bhavika/welcome/welcome.install new file mode 100644 index 0000000..0a1035c --- /dev/null +++ b/modules/bhavika/welcome/welcome.install @@ -0,0 +1,63 @@ +<?php + + +/** + + +* Implements hook_uninstall(). + + +*/ + + +function welcome_uninstall() { //<-- replace “welcome” with your module machine name + + + // Load services. + + + $queryFactory = \Drupal::service('entity.query'); + + + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + + + + + // Query all entity. + + + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + + + ->condition('type', 'clubs'); + + + $nids = $query->execute(); + + + + + + + + // Delete entities. + + + if (!empty($nids)) { + + + $entities = $nodeStorage->loadMultiple($nids); + + + $nodeStorage->delete($entities); + + + } + + +} diff --git a/modules/bhavika/welcome/welcome.module b/modules/bhavika/welcome/welcome.module new file mode 100644 index 0000000..0db90cd --- /dev/null +++ b/modules/bhavika/welcome/welcome.module @@ -0,0 +1,64 @@ +<?php + +/** + * @file + * Contains welcome.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function welcome_form_alter(&$form, &$form_state, $form_id){ + //print_r($form_id); + print_r($form['#view']); + if($form_id == 'node_page_form') + { + + //print_r($form); + + $form['actions']['submit']['#value'] = 'Update'; + // $show= print_r($form,true); + // echo $show; + //echo '<pre>'; + + //echo '</pre>'; + // echo '<pre>'; + // var_dump($form); + // echo '</pre>'; + } + if($form_id == 'system_site_information_settings') + { + // echo '<pre>'; + // print_r($form); + // echo '</pre>'; + $form['site_information']['site_name']['#default_value'] = 'L.D College Of Engineering'; + $form['site_information']['site_mail']['#default_value'] = 'ldce-abad-dte@gujarat.gov.in'; + } +} +function welcome_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the welcome module. + case 'help.page.welcome': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('this module shows welcome message to logged in user.') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function welcome_theme() { + return [ + 'welcome' => [ + 'render element' => 'children', + ], + ]; +} + + diff --git a/modules/bhavika/welcome/welcome.routing.yml b/modules/bhavika/welcome/welcome.routing.yml new file mode 100644 index 0000000..456e2b6 --- /dev/null +++ b/modules/bhavika/welcome/welcome.routing.yml @@ -0,0 +1,8 @@ + +welcome.welcome_controller_welcome: + path: '/welcome' + defaults: + _controller: '\Drupal\welcome\Controller\WelcomeController::welcome' + _title: 'WelcomeController' + requirements: + _permission: 'access content' diff --git a/modules/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/mansimran/academic_research/academic_research.info.yml b/modules/mansimran/academic_research/academic_research.info.yml new file mode 100644 index 0000000..da21bbc --- /dev/null +++ b/modules/mansimran/academic_research/academic_research.info.yml @@ -0,0 +1,14 @@ +name: 'academic research' +type: module +description: 'academic research content type' +core: 8.x +package: 'Custom' +dependencies: + - drupal:node + - drupal:text + - drupal:user + - drupal:menu_ui + - drupal:taxonomy + - drupal:path + - drupal:entity_reference_revisions + - drupal:paragraphs
\ No newline at end of file diff --git a/modules/mansimran/academic_research/academic_research.install b/modules/mansimran/academic_research/academic_research.install new file mode 100644 index 0000000..af9eeb5 --- /dev/null +++ b/modules/mansimran/academic_research/academic_research.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function academic_research_uninstall() { + // Load services. + $queryFactory = \Drupal::service('entity.query'); + $nodeStorage = \Drupal::entityManager()->getStorage('node'); + + + + // Query all entity. + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + ->condition('type', 'academic_research_'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + diff --git a/modules/mansimran/academic_research/academic_research.module b/modules/mansimran/academic_research/academic_research.module new file mode 100644 index 0000000..9ab122c --- /dev/null +++ b/modules/mansimran/academic_research/academic_research.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains academic_research.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function academic_research_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the academic_research module. + case 'help.page.academic_research': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('academic research content type') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function academic_research_theme() { + return [ + 'academic_research' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/mansimran/academic_research/composer.json b/modules/mansimran/academic_research/composer.json new file mode 100644 index 0000000..bc72237 --- /dev/null +++ b/modules/mansimran/academic_research/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/academic_research", + "type": "drupal-module", + "description": "academic research content type", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/academic_research", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/academic_research", + "source": "http://cgit.drupalcode.org/academic_research" + }, + "require": { } +} diff --git a/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml b/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml new file mode 100644 index 0000000..7279a61 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/core.entity_form_display.node.academic_research_.default.yml @@ -0,0 +1,108 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.academic_research_.body + - field.field.node.academic_research_.field_lab_facilities + - field.field.node.academic_research_.field_school + - node.type.academic_research_ + module: + - paragraphs + - path + - text + enforced: + module: + - academic_research +id: node.academic_research_.default +targetEntityType: node +bundle: academic_research_ +mode: default +content: + body: + type: text_textarea_with_summary + weight: 121 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_lab_facilities: + type: entity_reference_paragraphs + weight: 123 + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + third_party_settings: { } + region: content + field_school: + weight: 122 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml new file mode 100644 index 0000000..f87f926 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.default.yml @@ -0,0 +1,51 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.academic_research_.body + - field.field.node.academic_research_.field_lab_facilities + - field.field.node.academic_research_.field_school + - node.type.academic_research_ + module: + - entity_reference_revisions + - text + - user + enforced: + module: + - academic_research +id: node.academic_research_.default +targetEntityType: node +bundle: academic_research_ +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_lab_facilities: + type: entity_reference_revisions_entity_view + weight: 103 + label: hidden + settings: + view_mode: default + link: '' + third_party_settings: { } + region: content + field_school: + weight: 102 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml new file mode 100644 index 0000000..b99ccb4 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/core.entity_view_display.node.academic_research_.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.academic_research_.body + - node.type.academic_research_ + module: + - text + - user + enforced: + module: + - academic_research +id: node.academic_research_.teaser +targetEntityType: node +bundle: academic_research_ +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 100 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 101 + region: content + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml new file mode 100644 index 0000000..c750848 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.academic_research_ + module: + - text + enforced: + module: + - academic_research +id: node.academic_research_.body +field_name: body +entity_type: node +bundle: academic_research_ +label: Body +description: 'Some Description ' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml new file mode 100644 index 0000000..684315b --- /dev/null +++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_lab_facilities.yml @@ -0,0 +1,42 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_lab_facilities + - node.type.academic_research_ + - paragraphs.paragraphs_type.lab_facilities + module: + - entity_reference_revisions + enforced: + module: + - academic_research +id: node.academic_research_.field_lab_facilities +field_name: field_lab_facilities +entity_type: node +bundle: academic_research_ +label: 'Lab Facilities' +description: 'Lab facilities of VIT ' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + lab_facilities: lab_facilities + target_bundles_drag_drop: + lab_facilities: + enabled: true + weight: 5 + member_details_field: + weight: 6 + enabled: false + office_details: + weight: 7 + enabled: false + r_d_projects: + weight: 8 + enabled: false +field_type: entity_reference_revisions diff --git a/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml new file mode 100644 index 0000000..e0db681 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/field.field.node.academic_research_.field_school.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_school + - node.type.academic_research_ + - taxonomy.vocabulary.school_s_of_vit_ + enforced: + module: + - academic_research +id: node.academic_research_.field_school +field_name: field_school +entity_type: node +bundle: academic_research_ +label: school +description: 'School carrying the research' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + school_s_of_vit_: school_s_of_vit_ + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml b/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml new file mode 100644 index 0000000..e95b22c --- /dev/null +++ b/modules/mansimran/academic_research/config/install/field.storage.node.field_lab_facilities.yml @@ -0,0 +1,24 @@ +uuid: bd9a44a5-9301-4af6-9ac4-6e636ae16e0c +langcode: en +status: true +dependencies: + module: + - entity_reference_revisions + - node + - paragraphs + enforced: + module: + - academic_research +id: node.field_lab_facilities +field_name: field_lab_facilities +entity_type: node +type: entity_reference_revisions +settings: + target_type: paragraph +module: entity_reference_revisions +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml b/modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml new file mode 100644 index 0000000..73cccc0 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/field.storage.node.field_school.yml @@ -0,0 +1,23 @@ +uuid: 711659e0-ad09-4fac-9943-1efee9f2db4f +langcode: en +status: true +dependencies: + module: + - node + - taxonomy + enforced: + module: + - academic_research +id: node.field_school +field_name: field_school +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml new file mode 100644 index 0000000..378d87d --- /dev/null +++ b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_node_migration.yml @@ -0,0 +1,61 @@ +langcode: en +status: true +id: acad_node_migration +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'acad content migration' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/acad_node.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id +process: + type: + plugin: default_value + default_value: academic_research_ + title: title + body/value: body + body/format: + plugin: default_value + default_value: basic_html + field_school: + plugin: entity_lookup + entity_type: taxonomy_term + bundle: school_s_of_vit_ + source: school + field_lab_facilities/target_id: + - + plugin: migration_lookup + migration: acad_paragraph_migration + allow_multiple: true + source: id + no_stub: true + - + plugin: extract + index: + - 0 + field_lab_facilities/target_revision_id: + - + plugin: migration_lookup + migration: acad_paragraph_migration + allow_multiple: true + source: id + no_stub: true + - + plugin: extract + index: + - 1 +destination: + plugin: 'entity:node' + bundle: academic_research_ +migration_dependencies: + required: + - acad_paragraph_migration + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml new file mode 100644 index 0000000..fffaa67 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/migrate_plus.migration.acad_paragraph_migration.yml @@ -0,0 +1,48 @@ +langcode: en +status: true +id: acad_paragraph_migration +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - CSV +migration_group: default +label: 'acad content migration' +source: + plugin: csv + path: /home/mansimran/Desktop/mansimran1/acad_para.csv + delimiter: ',' + enclosure: '"' + header_row_count: 1 + keys: + - id + constants: + file_source: /var/www/migrationdata/programs + file_dest: 'public://programs/' +process: + type: + plugin: default_value + default_value: lab_facilities + source_path: + - + plugin: skip_on_empty + method: process + source: photos + - + plugin: concat + delimiter: / + source: + - constants/file_source + - photos + field_classrooms: classrooms + field_laboratories: laboratories + field_learning_ambience: ambience + field_photos: + plugin: file_import + source: '@source_path' + destination: constants/file_dest +destination: + plugin: entity_reference_revisions:paragraph +migration_dependencies: + required: { } + optional: { }
\ No newline at end of file diff --git a/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml b/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml new file mode 100644 index 0000000..32efada --- /dev/null +++ b/modules/mansimran/academic_research/config/install/node.type.academic_research_.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - academic_research +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Academic Research' +type: academic_research_ +description: 'this page will talk about the research activities in vit' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml b/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml new file mode 100644 index 0000000..ec2e6b8 --- /dev/null +++ b/modules/mansimran/academic_research/config/install/paragraphs.paragraphs_type.lab_facilities.yml @@ -0,0 +1,12 @@ +uuid: 436a9a77-4fed-4085-b474-3da0a8a78e1f +langcode: en +status: true +dependencies: + enforced: + module: + - academic_research +id: lab_facilities +label: 'Lab Facilities' +icon_uuid: null +description: '' +behavior_plugins: { } diff --git a/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml b/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml new file mode 100644 index 0000000..60fc7fd --- /dev/null +++ b/modules/mansimran/academic_research/config/install/taxonomy.vocabulary.school_s_of_vit_.yml @@ -0,0 +1,12 @@ +uuid: 30a88923-bcef-4a81-8cb9-a80941356747 +langcode: en +status: true +dependencies: + enforced: + module: + - academic_research +name: 'SCHOOL''s of vit' +vid: school_s_of_vit_ +description: 'Various academic schools in vit' +hierarchy: 0 +weight: 0 diff --git a/modules/mansimran/academic_research/templates/academic-research.html.twig b/modules/mansimran/academic_research/templates/academic-research.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/mansimran/academic_research/templates/academic-research.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php b/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..871ad96 --- /dev/null +++ b/modules/mansimran/academic_research/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\academic_research\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group academic_research + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['academic_research']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} 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..9a8f105 --- /dev/null +++ b/modules/mansimran/administrative_offices/administrative_offices.info.yml @@ -0,0 +1,5 @@ +name: 'administrative offices' +type: module +description: 'Administrative offices content type' +core: 8.x +package: 'Custom' 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..9349875 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/core.entity_form_display.node.administrative_offices.default.yml @@ -0,0 +1,95 @@ +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 +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..a173ed4 --- /dev/null +++ b/modules/mansimran/administrative_offices/config/install/paragraphs.paragraphs_type.office_details.yml @@ -0,0 +1,13 @@ +uuid: af03fad4-b366-424d-bd9e-71b303a68ff3 +langcode: en +status: true +dependencies: { } +id: office_details +label: 'Office details' +icon_uuid: null +description: '' +behavior_plugins: { } +dependecies: + enforced: + module: + - administrative_offices 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.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/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/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.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/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/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.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/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.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/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/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..09e0c21 --- /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: { }
\ No newline at end of file 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/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.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/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); + } + +} |