diff options
author | Fahad Israr | 2019-07-02 12:21:29 +0530 |
---|---|---|
committer | Fahad Israr | 2019-07-02 12:21:29 +0530 |
commit | 96794064b20917436ce73aedf015a9d53e8d00fb (patch) | |
tree | a5240a2a6e5c148ae7a95d9652aa6dee219e820b /modules/fahad/industry_partners | |
parent | 3ad1b8d590d7d11d83e8c923970690900dc31f70 (diff) | |
download | acadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.tar.gz acadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.tar.bz2 acadmix_distribution-96794064b20917436ce73aedf015a9d53e8d00fb.zip |
Custom Modules Added
Diffstat (limited to 'modules/fahad/industry_partners')
14 files changed, 469 insertions, 0 deletions
diff --git a/modules/fahad/industry_partners/composer.json b/modules/fahad/industry_partners/composer.json new file mode 100644 index 0000000..dcf57cd --- /dev/null +++ b/modules/fahad/industry_partners/composer.json @@ -0,0 +1,14 @@ +{ + "name": "drupal/industry_partners", + "type": "drupal-module", + "description": "My Awesome Module", + "keywords": ["Drupal"], + "license": "GPL-2.0+", + "homepage": "https://www.drupal.org/project/industry_partners", + "minimum-stability": "dev", + "support": { + "issues": "https://www.drupal.org/project/issues/industry_partners", + "source": "http://cgit.drupalcode.org/industry_partners" + }, + "require": { } +} diff --git a/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml b/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml new file mode 100644 index 0000000..4eecfbe --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_form_display.node.industry_partners.default.yml @@ -0,0 +1,105 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.industry_partners.body + - field.field.node.industry_partners.field_company_logo + - field.field.node.industry_partners.field_company_website + - image.style.thumbnail + - node.type.industry_partners + module: + - image + - link + - path + - text + enforced: + module: + - industry_partners +id: node.industry_partners.default +targetEntityType: node +bundle: industry_partners +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_company_logo: + weight: 122 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_company_website: + 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/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml new file mode 100644 index 0000000..e08a9fb --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.default.yml @@ -0,0 +1,56 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.industry_partners.body + - field.field.node.industry_partners.field_company_logo + - field.field.node.industry_partners.field_company_website + - node.type.industry_partners + module: + - image + - link + - text + - user + enforced: + module: + - industry_partners +id: node.industry_partners.default +targetEntityType: node +bundle: industry_partners +mode: default +content: + body: + label: hidden + type: text_default + weight: 101 + settings: { } + third_party_settings: { } + region: content + field_company_logo: + weight: 102 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_company_website: + 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/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml new file mode 100644 index 0000000..e6f8669 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/core.entity_view_display.node.industry_partners.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.industry_partners.body + - node.type.industry_partners + module: + - text + - user + enforced: + module: + - industry_partners +id: node.industry_partners.teaser +targetEntityType: node +bundle: industry_partners +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/industry_partners/config/install/field.field.node.industry_partners.body.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.body.yml new file mode 100644 index 0000000..7e2d30b --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.body.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.industry_partners + module: + - text + enforced: + module: + - industry_partners +id: node.industry_partners.body +field_name: body +entity_type: node +bundle: industry_partners +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/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml new file mode 100644 index 0000000..874aa06 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_logo.yml @@ -0,0 +1,40 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_logo + - node.type.industry_partners + module: + - image + enforced: + module: + - industry_partners +id: node.industry_partners.field_company_logo +field_name: field_company_logo +entity_type: node +bundle: industry_partners +label: 'Company Logo' +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: 500x500 + 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/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml new file mode 100644 index 0000000..1c6338e --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.field.node.industry_partners.field_company_website.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_company_website + - node.type.industry_partners + module: + - link + enforced: + module: + - industry_partners +id: node.industry_partners.field_company_website +field_name: field_company_website +entity_type: node +bundle: industry_partners +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/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml new file mode 100644 index 0000000..3f2b0d0 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_logo.yml @@ -0,0 +1,33 @@ +uuid: 8a85d339-64ca-45eb-9f99-89d032c8bef9 +langcode: en +status: true +dependencies: + module: + - file + - image + - node + enforced: + module: + - industry_partners +id: node.field_company_logo +field_name: field_company_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/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml new file mode 100644 index 0000000..27b7277 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/field.storage.node.field_company_website.yml @@ -0,0 +1,22 @@ +uuid: a77610e5-93fa-4b59-8e85-58016211a438 +langcode: en +status: true +dependencies: + module: + - link + - node + enforced: + module: + - industry_partners +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/fahad/industry_partners/config/install/node.type.industry_partners.yml b/modules/fahad/industry_partners/config/install/node.type.industry_partners.yml new file mode 100644 index 0000000..857f3e0 --- /dev/null +++ b/modules/fahad/industry_partners/config/install/node.type.industry_partners.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui + enforced: + module: + - industry_partners +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Industry Partners' +type: industry_partners +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/modules/fahad/industry_partners/industry_partners.info.yml b/modules/fahad/industry_partners/industry_partners.info.yml new file mode 100644 index 0000000..07b2f9d --- /dev/null +++ b/modules/fahad/industry_partners/industry_partners.info.yml @@ -0,0 +1,15 @@ +name: 'industry_partners' +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 + - drupal:datetime
\ No newline at end of file diff --git a/modules/fahad/industry_partners/industry_partners.module b/modules/fahad/industry_partners/industry_partners.module new file mode 100644 index 0000000..fb219dd --- /dev/null +++ b/modules/fahad/industry_partners/industry_partners.module @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Contains industry_partners.module. + */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function industry_partners_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the industry_partners module. + case 'help.page.industry_partners': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('My Awesome Module') . '</p>'; + return $output; + + default: + } +} + +/** + * Implements hook_theme(). + */ +function industry_partners_theme() { + return [ + 'industry_partners' => [ + 'render element' => 'children', + ], + ]; +} diff --git a/modules/fahad/industry_partners/templates/industry-partners.html.twig b/modules/fahad/industry_partners/templates/industry-partners.html.twig new file mode 100644 index 0000000..91e43c8 --- /dev/null +++ b/modules/fahad/industry_partners/templates/industry-partners.html.twig @@ -0,0 +1 @@ +<!-- Add you custom twig html here -->
\ No newline at end of file diff --git a/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php b/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..569b545 --- /dev/null +++ b/modules/fahad/industry_partners/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\industry_partners\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group industry_partners + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['industry_partners']; + + /** + * 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); + } + +} |