Contao\Model\Collection::getRelated PHP Method

getRelated() public method

Lazy load related records
public getRelated ( string $strKey ) : Model | static
$strKey string The property name
return Contao\Model | static The model or a model collection if there are multiple rows
    public function getRelated($strKey)
    {
        if ($this->intIndex < 0) {
            $this->first();
        }
        return $this->arrModels[$this->intIndex]->getRelated($strKey);
    }