src/ElementsExtension.php
public function ElementsByRelation(string $relationName)
    {
        $filter = [ 'RelationName' => $relationName ];
        if (
            $this->owner->hasExtension(ElementBase::FLUENT_CLASS)
            && !is_a(Controller::curr(), LeftAndMain::class)
        ) {
            $filter['Visible'] = true;
        }

        return $this->owner
            ->Elements()
            ->filter($filter)
        ;
    }
public function ElementsByRelation(string $relationName)
    {
        $filter = [ 'RelationName' => $relationName ];
        if (
            $this->owner->hasExtension(ElementBase::FLUENT_CLASS)
            && !is_a(Controller::curr(), LeftAndMain::class)
        ) {
            $filter['Visible'] = true;
        }

        return $this->owner
            ->Elements()
            ->filter($filter)
        ;
    }
public function ElementsByRelation ( string $ relationName ) { $ filter = [ 'RelationName' => $ relationName ] ; if ( $ this -> owner -> hasExtension ( ElementBase :: FLUENT_CLASS ) && ! is_a ( Controller :: curr ( ) , LeftAndMain :: class ) ) { $ filter [ 'Visible' ] = true ; } return $ this -> owner -> Elements ( ) -> filter ( $ filter ) ; }
Getter for items by relation name

@param  string $relationName
@return DataList
Getter for items by relation name