Méthode | Description | |
---|---|---|
__construct ( |
Public constructor. Initialises the relation. | |
getCountSubquery ( string $tableAlias = null ) : JDatabaseQuery | Returns the count subquery for DataModel's has() and whereHas() methods. | |
getNew ( ) : |
Returns a new item of the foreignModel type, pre-initialised to fulfil this relation |
Méthode | Description | |
---|---|---|
filterForeignModel ( |
Applies the relation filters to the foreign model when getData is called |
public __construct ( |
||
$parentModel | The data model we are attached to | |
$foreignModelName | string | The name of the foreign key's model in the format "modelName@com_something" |
$localKey | string | The local table key for this relation, default: parentModel's ID field name |
$foreignKey | string | The foreign key for this relation, default: parentModel's ID field name |
$pivotTable | string | IGNORED |
$pivotLocalKey | string | IGNORED |
$pivotForeignKey | string | IGNORED |
protected filterForeignModel ( |
||
$foreignModel | The foreign model you're operating on | |
$dataCollection | If it's an eager loaded relation, the collection of loaded parent records | |
Résultat | boolean | Return false to force an empty data collection |
public getCountSubquery ( string $tableAlias = null ) : JDatabaseQuery | ||
$tableAlias | string | The alias of the local table in the query. Leave blank to use the table's name. |
Résultat | JDatabaseQuery |
public getNew ( ) : |
||
Résultat |