How to create a Drupal 8 module for user file uploading?

I am attempting to allow users upload (large) files by pressing an upload button on a published page, in Drupal 8. I tried to create a module to handle the file uploading, but as a novice in Drupal I eventually got lost. Could anybody kindly offer some clues or helps on this topic? Such as which tutorial I should check out, existing modules with similar functions, existing discussions, what functions I could possibly use, etc.

How to create dependent Fields in the Content Page.

I have created a Taxonomy Vocabulary and terms within those Vocabulary as below. 

Vocabulary1

-- Term1

-- Term2

Vocabulary2

-- Term3

-- Term4

I have created two fields

field1

field2

Field1 contains list of all the vocabulary. and Fields2 should contains of terms with reference Vocabulary selected in field1. Lets say Vocabulary1 is selected in Field1 then field2 should display term1 and term2. if vocabulary2 is selected field2 should contain the terms3 and term4.

Migrate modules - source database fields disabled

I must be doing something particularly daft here.

I'm trying to use the Migrate modules in Drupal 8.4.4. I've installed Drupal successfully on a Synology NAS, and it seems to work. When I go to domain.dom/upgrade it still seems to work, but the fields for entering the source database are grayed out, and have the disabled property set to "disabled". Only the Database Password field is enabled.

I've also noticed that I cannot now disable the Migrate modules; the check boxes aren't enabled.

Drupal 8 - Views Contextual Filters - Value Greater or less then argument

After login save data & use throughout the website

I need to create an event subscriber for KernelEvents::REQUEST & then get user address data (count) from DB & store in $_SESSION.

After login is it accessible to every page? The value as User Address Count. If initially i stored in Session.

When user Edit Profile. Add 1 more address. Then again i need to store in session?

How to achieve this?

How do I preprocess templates in a theme file?

I have created two custom templates (header-before-login.html.twig and header-after-login.html.twig). I would like to get data from the database to pass to these templates using variables.

How can I overwrite this templates as preprocess in xyz.theme?

These are the paths of the files.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x