Parses the SQL join value.
Description
See also
Return
(string) Join value for the SQL query.
Source
File: src/db-objects/element-settings/element-setting-query.php
protected function parse_join() { $join = parent::parse_join(); if ( ! empty( $this->query_vars['form_id'] ) || ! empty( $this->query_vars['container_id'] ) ) { $table_name = $this->manager->get_table_name(); $element_table_name = $this->manager->get_parent_manager( 'elements' )->get_table_name(); $join .= " INNER JOIN %{$element_table_name}% ON ( %{$table_name}%.element_id = %{$element_table_name}%.id )"; if ( ! empty( $this->query_vars['form_id'] ) ) { $container_table_name = $this->manager->get_parent_manager( 'elements' )->get_parent_manager( 'containers' )->get_table_name(); $join .= " INNER JOIN %{$container_table_name}% ON ( %{$element_table_name}%.container_id = %{$container_table_name}%.id )"; } } return $join; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |