static function PageMembergroups(Page $page)
    {
        if (!$page->Exists())
        {
            return array();
        }
        $sql = Access::SqlBuilder();
        $tblPmg = PageMembergroup::Schema()->Table();
        $tblMg = Membergroup::Schema()->Table();
        $join = $sql->Join($tblPmg);
        $joinCondition = $sql->Equals($tblPmg->Field('MemberGroup'), $tblMg->Field('ID'));
        $where = $sql->Equals($tblPmg->Field('Page'), $sql->Value($page->GetID()));
        $orderBy = $sql->OrderList($sql->OrderAsc($tblMg->Field('Name')));
        
        return Membergroup::Schema()->Fetch(false, $where, $orderBy, null, 0, null, $join, JoinType::Inner(), $joinCondition);
    }
static function PageMembergroups(Page $page)
    {
        if (!$page->Exists())
        {
            return array();
        }
        $sql = Access::SqlBuilder();
        $tblPmg = PageMembergroup::Schema()->Table();
        $tblMg = Membergroup::Schema()->Table();
        $join = $sql->Join($tblPmg);
        $joinCondition = $sql->Equals($tblPmg->Field('MemberGroup'), $tblMg->Field('ID'));
        $where = $sql->Equals($tblPmg->Field('Page'), $sql->Value($page->GetID()));
        $orderBy = $sql->OrderList($sql->OrderAsc($tblMg->Field('Name')));
        
        return Membergroup::Schema()->Fetch(false, $where, $orderBy, null, 0, null, $join, JoinType::Inner(), $joinCondition);
    }
static function PageMembergroups ( Page $ page ) { if ( ! $ page -> Exists ( ) ) { return array ( ) ; } $ sql = Access :: SqlBuilder ( ) ; $ tblPmg = PageMembergroup :: Schema ( ) -> Table ( ) ; $ tblMg = Membergroup :: Schema ( ) -> Table ( ) ; $ join = $ sql -> Join ( $ tblPmg ) ; $ joinCondition = $ sql -> Equals ( $ tblPmg -> Field ( 'MemberGroup' ) , $ tblMg -> Field ( 'ID' ) ) ; $ where = $ sql -> Equals ( $ tblPmg -> Field ( 'Page' ) , $ sql -> Value ( $ page -> GetID ( ) ) ) ; $ orderBy = $ sql -> OrderList ( $ sql -> OrderAsc ( $ tblMg -> Field ( 'Name' ) ) ) ; return Membergroup :: Schema ( ) -> Fetch ( false , $ where , $ orderBy , null , 0 , null , $ join , JoinType :: Inner ( ) , $ joinCondition ) ; }
Gets the page's member groups
@param Page $page
@return Membergroup[] Returns the member groups assigned to the page
Gets the page s member groups