summaryrefslogtreecommitdiff
path: root/modules/fahad/academic_calendar_content
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fahad/academic_calendar_content')
-rw-r--r--modules/fahad/academic_calendar_content/academic_calendar_content.info.yml13
-rw-r--r--modules/fahad/academic_calendar_content/academic_calendar_content.module35
-rw-r--r--modules/fahad/academic_calendar_content/composer.json14
-rw-r--r--modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml103
-rw-r--r--modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml50
-rw-r--r--modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml33
-rw-r--r--modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml24
-rw-r--r--modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml29
-rw-r--r--modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml31
-rw-r--r--modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml26
-rw-r--r--modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml23
-rw-r--r--modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml20
-rw-r--r--modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml12
-rw-r--r--modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig1
-rw-r--r--modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php46
15 files changed, 460 insertions, 0 deletions
diff --git a/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml b/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml
new file mode 100644
index 0000000..a3076e7
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/academic_calendar_content.info.yml
@@ -0,0 +1,13 @@
+name: 'academic_calendar_content'
+type: module
+description: 'Academic Calendar Content Type'
+core: 8.x
+package: 'Custom'
+dependencies:
+ - drupal:file
+ - drupal:path
+ - drupal:text
+ - drupal:user
+ - drupal:node
+ - drupal:menu_ui
+ - drupal:taxonomy \ No newline at end of file
diff --git a/modules/fahad/academic_calendar_content/academic_calendar_content.module b/modules/fahad/academic_calendar_content/academic_calendar_content.module
new file mode 100644
index 0000000..9b4e25a
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/academic_calendar_content.module
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains academic_calendar_content.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function academic_calendar_content_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ // Main module help for the academic_calendar_content module.
+ case 'help.page.academic_calendar_content':
+ $output = '';
+ $output .= '<h3>' . t('About') . '</h3>';
+ $output .= '<p>' . t('Academic Calendar Content Type') . '</p>';
+ return $output;
+
+ default:
+ }
+}
+
+/**
+ * Implements hook_theme().
+ */
+function academic_calendar_content_theme() {
+ return [
+ 'academic_calendar_content' => [
+ 'render element' => 'children',
+ ],
+ ];
+}
diff --git a/modules/fahad/academic_calendar_content/composer.json b/modules/fahad/academic_calendar_content/composer.json
new file mode 100644
index 0000000..56c9201
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "drupal/academic_calendar_content",
+ "type": "drupal-module",
+ "description": "Academic Calendar Content Type",
+ "keywords": ["Drupal"],
+ "license": "GPL-2.0+",
+ "homepage": "https://www.drupal.org/project/academic_calendar_content",
+ "minimum-stability": "dev",
+ "support": {
+ "issues": "https://www.drupal.org/project/issues/academic_calendar_content",
+ "source": "http://cgit.drupalcode.org/academic_calendar_content"
+ },
+ "require": { }
+}
diff --git a/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml
new file mode 100644
index 0000000..480e11a
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/core.entity_form_display.node.academic_calendar_content.default.yml
@@ -0,0 +1,103 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.academic_calendar_content.body
+ - field.field.node.academic_calendar_content.field_calender_file
+ - field.field.node.academic_calendar_content.field_calender_type
+ - node.type.academic_calendar_content
+ module:
+ - file
+ - path
+ - text
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.default
+targetEntityType: node
+bundle: academic_calendar_content
+mode: default
+content:
+ body:
+ type: text_textarea_with_summary
+ weight: 121
+ settings:
+ rows: 9
+ summary_rows: 3
+ placeholder: ''
+ third_party_settings: { }
+ region: content
+ created:
+ type: datetime_timestamp
+ weight: 10
+ region: content
+ settings: { }
+ third_party_settings: { }
+ field_calender_file:
+ weight: 122
+ settings:
+ progress_indicator: throbber
+ third_party_settings: { }
+ type: file_generic
+ region: content
+ field_calender_type:
+ weight: 123
+ settings:
+ match_operator: CONTAINS
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ type: entity_reference_autocomplete
+ region: content
+ langcode:
+ type: language_select
+ weight: 2
+ region: content
+ settings:
+ include_locked: true
+ third_party_settings: { }
+ path:
+ type: path
+ weight: 30
+ region: content
+ settings: { }
+ third_party_settings: { }
+ promote:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 15
+ region: content
+ third_party_settings: { }
+ status:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 120
+ region: content
+ third_party_settings: { }
+ sticky:
+ type: boolean_checkbox
+ settings:
+ display_label: true
+ weight: 16
+ region: content
+ third_party_settings: { }
+ title:
+ type: string_textfield
+ weight: -5
+ region: content
+ settings:
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+ uid:
+ type: entity_reference_autocomplete
+ weight: 5
+ settings:
+ match_operator: CONTAINS
+ size: 60
+ placeholder: ''
+ region: content
+ third_party_settings: { }
+hidden: { }
diff --git a/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml
new file mode 100644
index 0000000..24048f0
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.default.yml
@@ -0,0 +1,50 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.node.academic_calendar_content.body
+ - field.field.node.academic_calendar_content.field_calender_file
+ - field.field.node.academic_calendar_content.field_calender_type
+ - node.type.academic_calendar_content
+ module:
+ - file
+ - text
+ - user
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.default
+targetEntityType: node
+bundle: academic_calendar_content
+mode: default
+content:
+ body:
+ label: hidden
+ type: text_default
+ weight: 101
+ settings: { }
+ third_party_settings: { }
+ region: content
+ field_calender_file:
+ weight: 102
+ label: above
+ settings:
+ use_description_as_link_text: true
+ third_party_settings: { }
+ type: file_default
+ region: content
+ field_calender_type:
+ weight: 103
+ label: above
+ settings:
+ link: true
+ third_party_settings: { }
+ type: entity_reference_label
+ region: content
+ links:
+ weight: 100
+ settings: { }
+ third_party_settings: { }
+ region: content
+hidden:
+ langcode: true
diff --git a/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml
new file mode 100644
index 0000000..cb44542
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/core.entity_view_display.node.academic_calendar_content.teaser.yml
@@ -0,0 +1,33 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - core.entity_view_mode.node.teaser
+ - field.field.node.academic_calendar_content.body
+ - node.type.academic_calendar_content
+ module:
+ - text
+ - user
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.teaser
+targetEntityType: node
+bundle: academic_calendar_content
+mode: teaser
+content:
+ body:
+ label: hidden
+ type: text_summary_or_trimmed
+ weight: 101
+ settings:
+ trim_length: 600
+ third_party_settings: { }
+ region: content
+ links:
+ weight: 100
+ settings: { }
+ third_party_settings: { }
+ region: content
+hidden:
+ langcode: true
diff --git a/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml
new file mode 100644
index 0000000..4e036ce
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.body.yml
@@ -0,0 +1,24 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.body
+ - node.type.academic_calendar_content
+ module:
+ - text
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.body
+field_name: body
+entity_type: node
+bundle: academic_calendar_content
+label: Body
+description: ''
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ display_summary: true
+field_type: text_with_summary
diff --git a/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml
new file mode 100644
index 0000000..93aa78f
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_file.yml
@@ -0,0 +1,29 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_calender_file
+ - node.type.academic_calendar_content
+ module:
+ - file
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.field_calender_file
+field_name: field_calender_file
+entity_type: node
+bundle: academic_calendar_content
+label: 'calender file'
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ file_directory: '[date:custom:Y]-[date:custom:m]'
+ file_extensions: 'txt pdf docx doc pptx ppt'
+ max_filesize: ''
+ description_field: false
+ handler: 'default:file'
+ handler_settings: { }
+field_type: file
diff --git a/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml
new file mode 100644
index 0000000..59ff251
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/field.field.node.academic_calendar_content.field_calender_type.yml
@@ -0,0 +1,31 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_calender_type
+ - node.type.academic_calendar_content
+ - taxonomy.vocabulary.academic_calender
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.academic_calendar_content.field_calender_type
+field_name: field_calender_type
+entity_type: node
+bundle: academic_calendar_content
+label: 'Calender type'
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ academic_calender: academic_calender
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml
new file mode 100644
index 0000000..65a2c30
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_file.yml
@@ -0,0 +1,26 @@
+uuid: fabaae87-0065-4967-8243-6515646f47ee
+langcode: en
+status: true
+dependencies:
+ module:
+ - file
+ - node
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.field_calender_file
+field_name: field_calender_file
+entity_type: node
+type: file
+settings:
+ display_field: false
+ display_default: false
+ uri_scheme: public
+ target_type: file
+module: file
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml
new file mode 100644
index 0000000..cbe0fcf
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/field.storage.node.field_calender_type.yml
@@ -0,0 +1,23 @@
+uuid: cd0df0ee-d712-40eb-bbbb-12a100fafb16
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - taxonomy
+ enforced:
+ module:
+ - academic_calendar_content
+id: node.field_calender_type
+field_name: field_calender_type
+entity_type: node
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml b/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml
new file mode 100644
index 0000000..fdb758a
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/node.type.academic_calendar_content.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - menu_ui
+ enforced:
+ module:
+ - academic_calendar_content
+third_party_settings:
+ menu_ui:
+ available_menus:
+ - main
+ parent: 'main:'
+name: 'Academic Calendar'
+type: academic_calendar_content
+description: ''
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: true
diff --git a/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml b/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml
new file mode 100644
index 0000000..cb954c2
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/config/install/taxonomy.vocabulary.academic_calender.yml
@@ -0,0 +1,12 @@
+uuid: 216d49b2-aa1e-44b0-b4a0-7c3d78450276
+langcode: en
+status: true
+dependencies:
+ enforced:
+ module:
+ - academic_calendar_content
+name: 'Academic Calender'
+vid: academic_calender
+description: 'Calendar and Time Table'
+hierarchy: 0
+weight: 0
diff --git a/modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig b/modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig
new file mode 100644
index 0000000..91e43c8
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/templates/academic-calendar-content.html.twig
@@ -0,0 +1 @@
+<!-- Add you custom twig html here --> \ No newline at end of file
diff --git a/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php b/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php
new file mode 100644
index 0000000..b62009a
--- /dev/null
+++ b/modules/fahad/academic_calendar_content/tests/src/Functional/LoadTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\Tests\academic_calendar_content\Functional;
+
+use Drupal\Core\Url;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Simple test to ensure that main page loads with module enabled.
+ *
+ * @group academic_calendar_content
+ */
+class LoadTest extends BrowserTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['academic_calendar_content'];
+
+ /**
+ * A user with permission to administer site configuration.
+ *
+ * @var \Drupal\user\UserInterface
+ */
+ protected $user;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function setUp() {
+ parent::setUp();
+ $this->user = $this->drupalCreateUser(['administer site configuration']);
+ $this->drupalLogin($this->user);
+ }
+
+ /**
+ * Tests that the home page loads with a 200 response.
+ */
+ public function testLoad() {
+ $this->drupalGet(Url::fromRoute('<front>'));
+ $this->assertSession()->statusCodeEquals(200);
+ }
+
+}