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

For example, parentModel is Users and foreignModel is Phones. Each uses has exactly one Phone.
상속: extends HasMany
파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

공개 메소드들

메소드 설명
getData ( callable $callback = null, Collection $dataCollection = null ) : Collection | DataModel Get the relation data.

메소드 상세

getData() 공개 메소드

If you want to apply additional filtering to the foreign model, use the $callback. It can be any function, static method, public method or closure with an interface of function(DataModel $foreignModel). You are not supposed to return anything, just modify $foreignModel's state directly. For example, you may want to do: $foreignModel->setState('foo', 'bar')
public getData ( callable $callback = null, Collection $dataCollection = null ) : Collection | DataModel
$callback callable The callback to run on the remote model.
$dataCollection FOF30\Model\DataModel\Collection
리턴 FOF30\Model\DataModel\Collection | FOF30\Model\DataModel