PHP 클래스 FOF30\Model\DataModel\Relation\BelongsTo

For example, parentModel is Articles and foreignModel is Users. Each article belongs to one user. One user can have one or more article. Example #2: parentModel is Phones and foreignModel is Users. Each phone belongs to one user. One user can have zero or one phones.
상속: extends HasOne
파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( DataModel $parentModel, string $foreignModelName, string $localKey = null, string $foreignKey = null, string $pivotTable = null, string $pivotLocalKey = null, string $pivotForeignKey = null ) Public constructor. Initialises the relation.
getNew ( ) This is not supported by the belongsTo relation

메소드 상세

__construct() 공개 메소드

Public constructor. Initialises the relation.
public __construct ( DataModel $parentModel, string $foreignModelName, string $localKey = null, string $foreignKey = null, string $pivotTable = null, string $pivotLocalKey = null, string $pivotForeignKey = null )
$parentModel FOF30\Model\DataModel 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

getNew() 공개 메소드

This is not supported by the belongsTo relation
public getNew ( )