summaryrefslogtreecommitdiff
path: root/modules/mansimran/student_clubs
diff options
context:
space:
mode:
authorMansimran72019-07-02 12:16:59 +0530
committerMansimran72019-07-02 12:16:59 +0530
commit4e585c030ed6b5ea73b77a696a78f8855d9a26d8 (patch)
treea9dd98d2648c35aa2357eb7bc473469f6cc8d417 /modules/mansimran/student_clubs
parent3ad1b8d590d7d11d83e8c923970690900dc31f70 (diff)
downloadacadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.gz
acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.bz2
acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.zip
pushing all custom modules
Diffstat (limited to 'modules/mansimran/student_clubs')
-rwxr-xr-xmodules/mansimran/student_clubs/composer.json14
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/core.entity_form_display.node.club_and_chapter.default.yml115
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.default.yml65
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/core.entity_view_display.node.club_and_chapter.teaser.yml39
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.body.yml24
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_facebook_link.yml25
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_logo_of_organisation.yml40
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.field.node.club_and_chapter.field_organisation_category.yml31
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.storage.node.field_facebook_link.yml22
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.storage.node.field_logo_of_organisation.yml33
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/field.storage.node.field_organisation_category.yml23
-rw-r--r--modules/mansimran/student_clubs/config/install/migrate_plus.migration.clubs_1.yml61
-rwxr-xr-xmodules/mansimran/student_clubs/config/install/node.type.club_and_chapter.yml20
-rwxr-xr-xmodules/mansimran/student_clubs/student_clubs.info.yml16
-rwxr-xr-xmodules/mansimran/student_clubs/student_clubs.module35
-rwxr-xr-xmodules/mansimran/student_clubs/templates/student-clubs.html.twig1
-rwxr-xr-xmodules/mansimran/student_clubs/tests/src/Functional/LoadTest.php46
17 files changed, 610 insertions, 0 deletions
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);
+ }
+
+}