diff options
author | Nitesh Kumar Sinha | 2019-07-02 13:32:41 +0530 |
---|---|---|
committer | GitHub | 2019-07-02 13:32:41 +0530 |
commit | 40040427eb696b443a52db952ce6915d3ee72a97 (patch) | |
tree | 5dde0580ac282768aeb48226e7d10c2e3f691172 /modules/fahad/bog_meetings | |
parent | 222f1780ed0f5c3536392df3236284d3a9ab5405 (diff) | |
parent | 5f6ba9cf4aee260e4192f194ed14d3bc9dd1b467 (diff) | |
download | acadmix_distribution-40040427eb696b443a52db952ce6915d3ee72a97.tar.gz acadmix_distribution-40040427eb696b443a52db952ce6915d3ee72a97.tar.bz2 acadmix_distribution-40040427eb696b443a52db952ce6915d3ee72a97.zip |
Merge pull request #6 from fahad-israr/master
Fahad: Custom Module Added
Diffstat (limited to 'modules/fahad/bog_meetings')
14 files changed, 437 insertions, 0 deletions
diff --git a/modules/fahad/bog_meetings/bog_meetings.info.yml b/modules/fahad/bog_meetings/bog_meetings.info.yml new file mode 100644 index 0000000..2fe952e --- /dev/null +++ b/modules/fahad/bog_meetings/bog_meetings.info.yml @@ -0,0 +1,13 @@ +name: 'bog_meetings' +type: module +description: 'Bog Meetings' +core: 8.x +package: 'Custom' +dependencies: + - drupal:file + - drupal:path + - drupal:text + - drupal:user + - drupal:node + - drupal:menu_ui + diff --git a/modules/fahad/bog_meetings/bog_meetings.module b/modules/fahad/bog_meetings/bog_meetings.module new file mode 100644 index 0000000..cf1a248 --- /dev/null +++ b/modules/fahad/bog_meetings/bog_meetings.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains bog_meetings.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function bog_meetings_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the bog_meetings module. + case 'help.page.bog_meetings': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Bog Meetings') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function bog_meetings_theme() { + return [ + 'bog_meetings' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/bog_meetings/composer.json b/modules/fahad/bog_meetings/composer.json new file mode 100644 index 0000000..81c2525 --- /dev/null +++ b/modules/fahad/bog_meetings/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/bog_meetings", + "type": "drupal-module", + "description": "Bog Meetings", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/bog_meetings", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/bog_meetings", + "source": "http://cgit.drupalcode.org/bog_meetings" + }, + "require": { } +} diff --git a/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml b/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml new file mode 100644 index 0000000..ac57c6e --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_form_display.node.bog_meetings.default.yml @@ -0,0 +1,100 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.bog_meetings.body + - field.field.node.bog_meetings.field_bog_date_time + - field.field.node.bog_meetings.field_bog_file + - node.type.bog_meetings + module: + - file + - path + - text + enforced: + module: + - bog_meetings +id: node.bog_meetings.default +targetEntityType: node +bundle: bog_meetings +mode: default +content: + body: + type: text_textarea_with_summary + weight: 121 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } + region: content + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_bog_date_time: + weight: 123 + settings: { } + third_party_settings: { } + type: datetime_timestamp + region: content + field_bog_file: + weight: 122 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: { } diff --git a/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml new file mode 100644 index 0000000..f5db250 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.default.yml @@ -0,0 +1,52 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.bog_meetings.body + - field.field.node.bog_meetings.field_bog_date_time + - field.field.node.bog_meetings.field_bog_file + - node.type.bog_meetings + module: + - file + - text + - user + enforced: + module: + - bog_meetings +id: node.bog_meetings.default +targetEntityType: node +bundle: bog_meetings +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_bog_date_time: + weight: 103 + label: above + settings: + date_format: medium + custom_date_format: '' + timezone: '' + third_party_settings: { } + type: timestamp + region: content + field_bog_file: + weight: 102 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml new file mode 100644 index 0000000..30d55a6 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/core.entity_view_display.node.bog_meetings.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.bog_meetings.body + - node.type.bog_meetings + module: + - text + - user + enforced: + module: + - bog_meetings +id: node.bog_meetings.teaser +targetEntityType: node +bundle: bog_meetings +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 101 + settings: + trim_length: 600 + third_party_settings: { } + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + langcode: true diff --git a/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml new file mode 100644 index 0000000..3a12aa2 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.bog_meetings + module: + - text + enforced: + module: + - bog_meetings +id: node.bog_meetings.body +field_name: body +entity_type: node +bundle: bog_meetings +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true +field_type: text_with_summary diff --git a/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml new file mode 100644 index 0000000..0cccb61 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_date_time.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_bog_date_time + - node.type.bog_meetings + enforced: + module: + - bog_meetings +id: node.bog_meetings.field_bog_date_time +field_name: field_bog_date_time +entity_type: node +bundle: bog_meetings +label: 'bog date/Time' +description: '' +required: false +translatable: false +default_value: + - + value: 1559973785 +default_value_callback: '' +settings: { } +field_type: timestamp diff --git a/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml new file mode 100644 index 0000000..5449d93 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.field.node.bog_meetings.field_bog_file.yml @@ -0,0 +1,29 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_bog_file + - node.type.bog_meetings + module: + - file + enforced: + module: + - bog_meetings +id: node.bog_meetings.field_bog_file +field_name: field_bog_file +entity_type: node +bundle: bog_meetings +label: 'bog file' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt pdf docx doc pptx ppt' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml new file mode 100644 index 0000000..debbf5a --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_date_time.yml @@ -0,0 +1,21 @@ +uuid: 3f598fd3-a111-4c7a-9862-036c50eabd6f +langcode: en +status: true +dependencies: + module: + - node + enforced: + module: + - bog_meetings +id: node.field_bog_date_time +field_name: field_bog_date_time +entity_type: node +type: timestamp +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml new file mode 100644 index 0000000..9814479 --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/field.storage.node.field_bog_file.yml @@ -0,0 +1,26 @@ +uuid: 5940e961-5e06-438b-9378-00f95e3c7fd8 +langcode: en +status: true +dependencies: + module: + - file + - node + enforced: + module: + - bog_meetings +id: node.field_bog_file +field_name: field_bog_file +entity_type: node +type: file +settings: + display_field: true + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml b/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml new file mode 100644 index 0000000..4b508cf --- /dev/null +++ b/modules/fahad/bog_meetings/config/install/node.type.bog_meetings.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - bog_meetings +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'BoG Meetings' +type: bog_meetings +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/bog_meetings/templates/bog-meetings.html.twig b/modules/fahad/bog_meetings/templates/bog-meetings.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/bog_meetings/templates/bog-meetings.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php b/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..7f21cec --- /dev/null +++ b/modules/fahad/bog_meetings/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\bog_meetings\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group bog_meetings + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['bog_meetings']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->user = $this->drupalCreateUser(['administer site configuration']); + $this->drupalLogin($this->user); + } + + /** + * Tests that the home page loads with a 200 response. + */ + public function testLoad() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} |