D8 - View Joins

I am trying to set up an exposed filter in a view in my module that lets a user filter content based on a drop-down menu containing the U.S. State that the content creator's username is registered in. I am not sure how I can go about creating a join in the query.
In the database, I can get the data I need by running the following query:

Select
*
From
node_field_data Inner Join
users On node_field_data.uid = users.uid Inner Join
user__field_state On users.uid = user__field_state.entity_id

Retrieving webform data for editing

Hi good Drupal folks,
I have created a couple of worksheets that users need to fill out as webforms. Along with the data i need to track, I am also storing the current user and the current custom module uid that tracks the current document that users are developing. In order words, the custom module captures data that is stored and will later be used to generate a Word document that includes all that data, minus the data on the webforms I'm creating that help them figure out what data they need to capture.

Do I need a service for parsing a custom XML file?

"Most of the logic of your site and of your module belongs in services."

- Larry Garfield @ DrupalCon Los Angeles 2015: Drupal 8: The Crash Course - https://youtu.be/8vwC_01KFLo?t=2387

What means "most". I successfully created a service class. And it is injected into my controller all fine and working nicely. But I am not sure that I have a problem that needs a service.

Drupal 8 RestApi resource

hi,

Im trying to create a custom restAPI resource.

When implementing a custom GET function, i get results.
But when creating a post, i always get Method Not Allowed (Allow: GET)

Here is my post function, its simple

  public function post() {
    \Drupal::logger('test_module')->notice('post received');
  }

any help?

How to restrict previous date display in custom forms in drupal 8 ?

I created a custom module for form which accepts from date and to date as user input i would like to restrict the user from selecting a date prior to current date. below is my code snippet.

$form['oneway']['from_date'] = array (
'#type' => 'date',
'#title' => t('From Date'),
'#date_year_range' => '-80:0',
'#required' => TRUE,
);

Please help me out ....

Run Drupal on HTTP/2

The big thing this year on the low level is HTTP/2. You can start running Drupal on the H2O web server today.

Read about the different server options and a guide to get started serving HTTP/2 today here: Serving Drupal on HTTP/2 with H2O and HHVM

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x