getData() public method

Gets the related items of a relation
See also: Relation::getData()
public getData ( string $name, callable $callback = null, Collection $dataCollection = null ) : Collection | DataModel
$name string The name of the relation to return data for
$callback callable A callback to customise the returned data
$dataCollection FOF30\Utils\Collection Used when fetching the data of an eager loaded relation
return Collection | DataModel
Example #1
0
 /**
  * @group       RelationManager
  * @group       RelationManagerGetData
  * @covers      FOF30\Model\DataModel\RelationManager::getData
  */
 public function testGetDataException()
 {
     $this->setExpectedException('\\FOF30\\Model\\DataModel\\Relation\\Exception\\RelationNotFound');
     $model = $this->buildModel();
     $relation = new RelationManager($model);
     $relation->getData('test');
 }