summaryrefslogtreecommitdiff
path: root/modules/fahad/festivals
diff options
context:
space:
mode:
authorFahad Israr2019-07-02 12:21:29 +0530
committerFahad Israr2019-07-02 12:21:29 +0530
commit96794064b20917436ce73aedf015a9d53e8d00fb (patch)
treea5240a2a6e5c148ae7a95d9652aa6dee219e820b /modules/fahad/festivals
parent3ad1b8d590d7d11d83e8c923970690900dc31f70 (diff)
downloadacadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.tar.gz
acadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.tar.bz2
acadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.zip
Custom Modules Added
Diffstat (limited to 'modules/fahad/festivals')
-rw-r--r--modules/fahad/festivals/composer.json14
-rw-r--r--modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml114
-rw-r--r--modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml66
-rw-r--r--modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml33
-rw-r--r--modules/fahad/festivals/config/install/field.field.node.festivals.body.yml24
-rw-r--r--modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml25
-rw-r--r--modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml29
-rw-r--r--modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml40
-rw-r--r--modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml22
-rw-r--r--modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml26
-rw-r--r--modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml33
-rw-r--r--modules/fahad/festivals/config/install/node.type.festivals.yml20
-rw-r--r--modules/fahad/festivals/festivals.info.yml14
-rw-r--r--modules/fahad/festivals/festivals.module35
-rw-r--r--modules/fahad/festivals/templates/festivals.html.twig1
-rw-r--r--modules/fahad/festivals/tests/src/Functional/LoadTest.php46
16 files changed, 542 insertions, 0 deletions
diff --git a/modules/fahad/festivals/composer.json b/modules/fahad/festivals/composer.json
new file mode 100644
index 0000000..864c0a3
--- /dev/null
+++ b/modules/fahad/festivals/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "drupal/festivals",
+ "type": "drupal-module",
+ "description": "My Awesome Module",
+ "keywords": ["Drupal"],
+ "license": "GPL-2.0+",
+ "homepage": "https://www.drupal.org/project/festivals",
+ "minimum-stability": "dev",
+ "support": {
+ "issues": "https://www.drupal.org/project/issues/festivals",
+ "source": "http://cgit.drupalcode.org/festivals"
+ },
+ "require": { }
+}
diff --git a/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml b/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml
new file mode 100644
index 0000000..11c97dd
--- /dev/null
+++ b/modules/fahad/festivals/config/install/core.entity_form_display.node.festivals.default.yml
@@ -0,0 +1,114 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.festivals.body
+ - field.field.node.festivals.field_fastival_link
+ - field.field.node.festivals.field_festival_file
+ - field.field.node.festivals.field_festival_image
+ - image.style.thumbnail
+ - node.type.festivals
+ module:
+ - file
+ - image
+ - link
+ - path
+ - text
+ enforced:
+ module:
+ - festivals
+id: node.festivals.default
+targetEntityType: node
+bundle: festivals
+mode: default
+content:
+ body:
+ type: text_textarea_with_summary
+ weight: 121
+ settings:
+ rows: 9
+ summary_rows: 3
+ placeholder: ''
+ third_party_settings: { }
+ region: content
+ created:
+ type: datetime_timestamp
+ weight: 10
+ region: content
+ settings: { }
+ third_party_settings: { }
+ field_fastival_link:
+ weight: 123
+ settings:
+ placeholder_url: ''
+ placeholder_title: ''
+ third_party_settings: { }
+ type: link_default
+ region: content
+ field_festival_file:
+ weight: 124
+ settings:
+ progress_indicator: throbber
+ third_party_settings: { }
+ type: file_generic
+ region: content
+ field_festival_image:
+ weight: 122
+ settings:
+ progress_indicator: throbber
+ preview_image_style: thumbnail
+ third_party_settings: { }
+ type: image_image
+ region: content
+ langcode:
+ type: language_select
+ weight: 2
+ region: content
+ settings:
+ include_locked: true
+ third_party_settings: { }
+ path:
+ type: path
+ weight: 30
+ region: content
+ settings: { }
+ third_party_settings: { }
+ promote:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 15
+ region: content
+ third_party_settings: { }
+ status:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 120
+ region: content
+ third_party_settings: { }
+ sticky:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 16
+ region: content
+ third_party_settings: { }
+ title:
+ type: string_textfield
+ weight: -5
+ region: content
+ settings:
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ uid:
+ type: entity_reference_autocomplete
+ weight: 5
+ settings:
+ match_operator: CONTAINS
+ size: 60
+ placeholder: ''
+ region: content
+ third_party_settings: { }
+hidden: { }
diff --git a/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml
new file mode 100644
index 0000000..f99a9f8
--- /dev/null
+++ b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.default.yml
@@ -0,0 +1,66 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.festivals.body
+ - field.field.node.festivals.field_fastival_link
+ - field.field.node.festivals.field_festival_file
+ - field.field.node.festivals.field_festival_image
+ - node.type.festivals
+ module:
+ - file
+ - image
+ - link
+ - text
+ - user
+ enforced:
+ module:
+ - festivals
+id: node.festivals.default
+targetEntityType: node
+bundle: festivals
+mode: default
+content:
+ body:
+ label: hidden
+ type: text_default
+ weight: 101
+ settings: { }
+ third_party_settings: { }
+ region: content
+ field_fastival_link:
+ weight: 103
+ label: hidden
+ settings:
+ trim_length: 80
+ url_only: false
+ url_plain: false
+ rel: ''
+ target: ''
+ third_party_settings: { }
+ type: link
+ region: content
+ field_festival_file:
+ weight: 104
+ label: hidden
+ settings:
+ use_description_as_link_text: true
+ third_party_settings: { }
+ type: file_default
+ region: content
+ field_festival_image:
+ weight: 102
+ label: hidden
+ settings:
+ image_style: ''
+ image_link: ''
+ third_party_settings: { }
+ type: image
+ region: content
+ links:
+ weight: 100
+ region: content
+ settings: { }
+ third_party_settings: { }
+hidden:
+ langcode: true
diff --git a/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml
new file mode 100644
index 0000000..cfca1d9
--- /dev/null
+++ b/modules/fahad/festivals/config/install/core.entity_view_display.node.festivals.teaser.yml
@@ -0,0 +1,33 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - core.entity_view_mode.node.teaser
+ - field.field.node.festivals.body
+ - node.type.festivals
+ module:
+ - text
+ - user
+ enforced:
+ module:
+ - festivals
+id: node.festivals.teaser
+targetEntityType: node
+bundle: festivals
+mode: teaser
+content:
+ body:
+ label: hidden
+ type: text_summary_or_trimmed
+ weight: 101
+ settings:
+ trim_length: 600
+ third_party_settings: { }
+ region: content
+ links:
+ weight: 100
+ settings: { }
+ third_party_settings: { }
+ region: content
+hidden:
+ langcode: true
diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.body.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.body.yml
new file mode 100644
index 0000000..630c8df
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.field.node.festivals.body.yml
@@ -0,0 +1,24 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.body
+ - node.type.festivals
+ module:
+ - text
+ enforced:
+ module:
+ - festivals
+id: node.festivals.body
+field_name: body
+entity_type: node
+bundle: festivals
+label: Body
+description: ''
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ display_summary: true
+field_type: text_with_summary
diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml
new file mode 100644
index 0000000..bf12331
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_fastival_link.yml
@@ -0,0 +1,25 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_fastival_link
+ - node.type.festivals
+ module:
+ - link
+ enforced:
+ module:
+ - festivals
+id: node.festivals.field_fastival_link
+field_name: field_fastival_link
+entity_type: node
+bundle: festivals
+label: fastival_link
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ link_type: 17
+ title: 2
+field_type: link
diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml
new file mode 100644
index 0000000..36a39e4
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_file.yml
@@ -0,0 +1,29 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_festival_file
+ - node.type.festivals
+ module:
+ - file
+ enforced:
+ module:
+ - festivals
+id: node.festivals.field_festival_file
+field_name: field_festival_file
+entity_type: node
+bundle: festivals
+label: festival_file
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ file_directory: '[date:custom:Y]-[date:custom:m]'
+ file_extensions: 'txt pdf img docx doc pptxt ppt'
+ max_filesize: ''
+ description_field: false
+ handler: 'default:file'
+ handler_settings: { }
+field_type: file
diff --git a/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml
new file mode 100644
index 0000000..49a456f
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.field.node.festivals.field_festival_image.yml
@@ -0,0 +1,40 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_festival_image
+ - node.type.festivals
+ module:
+ - image
+ enforced:
+ module:
+ - festivals
+id: node.festivals.field_festival_image
+field_name: field_festival_image
+entity_type: node
+bundle: festivals
+label: festival_image
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ file_directory: '[date:custom:Y]-[date:custom:m]'
+ file_extensions: 'png gif jpg jpeg'
+ max_filesize: ''
+ max_resolution: ''
+ min_resolution: ''
+ alt_field: true
+ alt_field_required: true
+ title_field: true
+ title_field_required: false
+ default_image:
+ uuid: ''
+ alt: ''
+ title: ''
+ width: null
+ height: null
+ handler: 'default:file'
+ handler_settings: { }
+field_type: image
diff --git a/modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml b/modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml
new file mode 100644
index 0000000..c978af5
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.storage.node.field_fastival_link.yml
@@ -0,0 +1,22 @@
+uuid: b246b8f3-2171-4bbe-a01a-30c19cfd5699
+langcode: en
+status: true
+dependencies:
+ module:
+ - link
+ - node
+ enforced:
+ module:
+ - festivals
+id: node.field_fastival_link
+field_name: field_fastival_link
+entity_type: node
+type: link
+settings: { }
+module: link
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml b/modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml
new file mode 100644
index 0000000..ed54480
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.storage.node.field_festival_file.yml
@@ -0,0 +1,26 @@
+uuid: 51f79e04-9685-4f7e-93b7-72d00c18eb26
+langcode: en
+status: true
+dependencies:
+ module:
+ - file
+ - node
+ enforced:
+ module:
+ - festivals
+id: node.field_festival_file
+field_name: field_festival_file
+entity_type: node
+type: file
+settings:
+ display_field: true
+ display_default: false
+ uri_scheme: public
+ target_type: file
+module: file
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml b/modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml
new file mode 100644
index 0000000..13347c6
--- /dev/null
+++ b/modules/fahad/festivals/config/install/field.storage.node.field_festival_image.yml
@@ -0,0 +1,33 @@
+uuid: 6630d2e4-2444-4c5c-b59d-a57438eb2a60
+langcode: en
+status: true
+dependencies:
+ module:
+ - file
+ - image
+ - node
+ enforced:
+ module:
+ - festivals
+id: node.field_festival_image
+field_name: field_festival_image
+entity_type: node
+type: image
+settings:
+ uri_scheme: public
+ default_image:
+ uuid: ''
+ alt: ''
+ title: ''
+ width: null
+ height: null
+ target_type: file
+ display_field: false
+ display_default: false
+module: image
+locked: false
+cardinality: 2
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/modules/fahad/festivals/config/install/node.type.festivals.yml b/modules/fahad/festivals/config/install/node.type.festivals.yml
new file mode 100644
index 0000000..a0e5e2a
--- /dev/null
+++ b/modules/fahad/festivals/config/install/node.type.festivals.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - menu_ui
+ enforced:
+ module:
+ - festivals
+third_party_settings:
+ menu_ui:
+ available_menus:
+ - main
+ parent: 'main:'
+name: Festivals
+type: festivals
+description: 'Various Cultural and related Events'
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: true
diff --git a/modules/fahad/festivals/festivals.info.yml b/modules/fahad/festivals/festivals.info.yml
new file mode 100644
index 0000000..1dc41d2
--- /dev/null
+++ b/modules/fahad/festivals/festivals.info.yml
@@ -0,0 +1,14 @@
+name: 'festivals'
+type: module
+description: 'My Awesome Module'
+core: 8.x
+package: 'Custom'
+dependencies:
+ - drupal:text
+ - drupal:path
+ - drupal:user
+ - drupal:node
+ - drupal:menu_ui
+ - drupal:image
+ - drupal:file
+ - drupal:link \ No newline at end of file
diff --git a/modules/fahad/festivals/festivals.module b/modules/fahad/festivals/festivals.module
new file mode 100644
index 0000000..01a7a72
--- /dev/null
+++ b/modules/fahad/festivals/festivals.module
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains festivals.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function festivals_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ // Main module help for the festivals module.
+ case 'help.page.festivals':
+ $output = '';
+ $output .= '<h3>' . t('About') . '</h3>';
+ $output .= '<p>' . t('My Awesome Module') . '</p>';
+ return $output;
+
+ default:
+ }
+}
+
+/**
+ * Implements hook_theme().
+ */
+function festivals_theme() {
+ return [
+ 'festivals' => [
+ 'render element' => 'children',
+ ],
+ ];
+}
diff --git a/modules/fahad/festivals/templates/festivals.html.twig b/modules/fahad/festivals/templates/festivals.html.twig
new file mode 100644
index 0000000..91e43c8
--- /dev/null
+++ b/modules/fahad/festivals/templates/festivals.html.twig
@@ -0,0 +1 @@
+<!-- Add you custom twig html here --> \ No newline at end of file
diff --git a/modules/fahad/festivals/tests/src/Functional/LoadTest.php b/modules/fahad/festivals/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..9e7d3e5
--- /dev/null
+++ b/modules/fahad/festivals/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\festivals\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group festivals
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['festivals'];
+
+ /**
+ * A user with permission to administer site configuration.
+ *
+ * @var \Drupal\user\UserInterface
+ */
+ protected $user;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function setUp() {
+ parent::setUp();
+ $this->user = $this->drupalCreateUser(['administer site configuration']);
+ $this->drupalLogin($this->user);
+ }
+
+ /**
+ * Tests that the home page loads with a 200 response.
+ */
+ public function testLoad() {
+ $this->drupalGet(Url::fromRoute('<front>'));
+ $this->assertSession()->statusCodeEquals(200);
+ }
+
+}