The function describes itself if you check comments added before the function.
/**
* Join regular table field and use an attribute as fk
*
* Examples:
* ('country_name', 'directory_country_name', 'name', 'country_id=shipping_country',
* "{{table}}.language_code='en'", 'left')
*
* @param string $alias 'country_name'
* @param string $table 'directory_country_name'
* @param string $field 'name'
* @param string $bind 'PK(country_id)=FK(shipping_country_id)'
* @param string|array $cond "{{table}}.language_code='en'" OR array('language_code'=>'en')
* @param string $joinType 'left'
* @return $this
* @throws LocalizedException
*/
First Argument is $alias
which allows to add the alias for the table name we want to join.
Second argument is $table
which is actual table name in the database.
Third argument is $field
, the field which we want to join
Fourth argument is $bind
where you define the ON
condition of your sql query
Fifth argument is $cond
which allows to add where
conditions
Last argument is $joinType
which defines your table join type. left
, right
, inner