concrete/src/Page/Page.php
public function getPageRelations()
    {
        $em = \Database::connection()->getEntityManager();
        $r = $em->getRepository('Concrete\Core\Entity\Page\Relation\SiblingRelation');
        $relation = $r->findOneBy(['cID' => $this->getCollectionID()]);
        $relations = array();
        if (is_object($relation)) {
            $allRelations = $r->findBy(['mpRelationID' => $relation->getPageRelationID()]);
            foreach($allRelations as $relation) {
                if ($relation->getPageID() != $this->getCollectionID() && $relation->getPageObject()->getSiteTreeObject() instanceof SiteTree) {
                    $relations[] = $relation;
                }
            }
        }
        return $relations;
    }
public function getPageRelations()
    {
        $em = \Database::connection()->getEntityManager();
        $r = $em->getRepository('Concrete\Core\Entity\Page\Relation\SiblingRelation');
        $relation = $r->findOneBy(['cID' => $this->getCollectionID()]);
        $relations = array();
        if (is_object($relation)) {
            $allRelations = $r->findBy(['mpRelationID' => $relation->getPageRelationID()]);
            foreach($allRelations as $relation) {
                if ($relation->getPageID() != $this->getCollectionID() && $relation->getPageObject()->getSiteTreeObject() instanceof SiteTree) {
                    $relations[] = $relation;
                }
            }
        }
        return $relations;
    }
public function getPageRelations ( ) { $ em = \ Database :: connection ( ) -> getEntityManager ( ) ; $ r = $ em -> getRepository ( 'Concrete\Core\Entity\Page\Relation\SiblingRelation' ) ; $ relation = $ r -> findOneBy ( [ 'cID' => $ this -> getCollectionID ( ) ] ) ; $ relations = array ( ) ; if ( is_object ( $ relation ) ) { $ allRelations = $ r -> findBy ( [ 'mpRelationID' => $ relation -> getPageRelationID ( ) ] ) ; foreach ( $ allRelations as $ relation ) { if ( $ relation -> getPageID ( ) != $ this -> getCollectionID ( ) && $ relation -> getPageObject ( ) -> getSiteTreeObject ( ) instanceof SiteTree ) { $ relations [ ] = $ relation ; } } } return $ relations ; }
Get the relations of this page.

@return \Concrete\Core\Entity\Page\Relation\SiblingRelation[]
Get the relations of this page .