'Member/CECreditHistory/Show', 'rules' => array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4, 6, 7), 'comparation' => 'in_array'), ), // OR Rule 2 array( array('field' => 'id_mncar_l_type', 'value' => array(1, 2, 3, 4), 'comparation' => 'in_array'), ), // Or Rule 3 array( array('field' => 'id_misc_type', 'value' => array(1, 2), 'comparation' => 'in_array'), ), ), ); $_miscTypeChains = array( array('field' => 'id_misc_type', 'value' => array(3), 'comparation' => 'in_array'), array('field' => 'id_mncar_type', 'value' => array(5), 'comparation' => 'in_array'), array('field' => 'id_mncar_l_type', 'value' => array(5), 'comparation' => 'in_array'), ); $_miscNonMemberRule = array( array('field' => 'allow_mcpe_access', 'value' => 'y'), array('field' => 'id_mcpe_access_type', 'value' => array(4), 'comparation' => 'in_array'), ); $miscNonMemberRules = array(); foreach ($_miscTypeChains as $chain) { $_rules = $_miscNonMemberRule; $_rules[] = $chain; $miscNonMemberRules[] = $_rules; } $broadcastEmailRules = array( // Rule 1 array( array('field' => 'allow_mcpe_access', 'value' => 'y'), ), ); $broadcastRepositoryRules = array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4), 'comparation' => 'in_array'), array('field' => 'allow_mcpe_access', 'value' => 'y'), ), // OR Rule 2 array( array('field' => 'id_mncar_l_type', 'value' => array(1, 3, 4), 'comparation' => 'in_array'), array('field' => 'allow_mcpe_access', 'value' => 'y'), ), // OR Rule 3 array( array('field' => 'id_misc_type', 'value' => array(1, 2, 4), 'comparation' => 'in_array'), array('field' => 'allow_mcpe_access', 'value' => 'y'), ), ); $broadcastRepositoryRules = array_merge($broadcastRepositoryRules, $miscNonMemberRules); $items[] = array( 'type' => 'BroadcastEmail', 'rules' => $broadcastEmailRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'account/broadcast-email', 'rules' => array_merge($broadcastEmailRules, $broadcastRepositoryRules), ); $items[] = array( 'type' => 'BroadcastEmail/Repository/Show', 'rules' => $broadcastRepositoryRules ); $myAccountRules = array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4, 6, 7), 'comparation' => 'in_array'), ), // Or Rule 2 array( array('field' => 'id_mncar_l_type', 'value' => array(1, 2, 3, 4), 'comparation' => 'in_array'), ), // Or Rule 3 array( array('field' => 'id_misc_type', 'value' => array(1, 2, 4), 'comparation' => 'in_array'), ), ); $myAccountRules = array_merge($myAccountRules, $miscNonMemberRules); $items[] = array( 'type' => 'Member/MyAccount', 'rules' => $myAccountRules ); $items[] = array( 'type' => 'Member/Profile', 'rules' => $myAccountRules ); $items[] = array( 'type' => 'Member/CustomizeHomePage', 'rules' => $myAccountRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'account/focus-monthly-e-newsletter-settings.html', 'rules' => array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4, 7), 'comparation' => 'in_array'), ), // OR Rule 2 array( array('field' => 'id_mncar_l_type', 'value' => array(1, 2, 3, 4), 'comparation' => 'in_array'), ), // OR Rule 3 array( array('field' => 'id_misc_type', 'value' => array(2), 'comparation' => 'in_array'), ), ) ); $legalFormRules = array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4, 7), 'comparation' => 'in_array'), array('field' => 'id_mncar_status', 'value' => array(1, 3), 'comparation' => 'in_array'), ), // OR Rule 2 array( array('field' => 'id_misc_type', 'value' => array(2), 'comparation' => 'in_array'), array('field' => 'id_misc_status', 'value' => array(1, 3), 'comparation' => 'in_array'), ), ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'association/resources-mn-nar', 'rules' => $legalFormRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'association/resources-mn-nar/legal-hotline.html', 'rules' => $legalFormRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'association/resources-mn-nar/technical-hotline.html', 'rules' => $legalFormRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'association/resources-mn-nar/legal-forms.html', 'rules' => $legalFormRules ); $items[] = array( 'type' => 'HTMLBlock/Show', 'name' => 'association/MNCAR-Realtors/legal-forms.html', 'rules' => $legalFormRules ); $items[] = array( 'type' => 'Member/CustomizeRss', 'rules' => array( // Rule 1 array( array('field' => 'id_mncar_type', 'value' => array(1, 2, 3, 4, 6, 7), 'comparation' => 'in_array'), ), // OR Rule 2 array( array('field' => 'id_mncar_l_type', 'value' => array(1, 2, 3, 4), 'comparation' => 'in_array'), ), // OR Rule 3 array( array('field' => 'id_misc_type', 'value' => array(1, 2, 4), 'comparation' => 'in_array'), ), ) ); // --------------------------------------------------------------------------------------------------------------------- $config = array( 'defaultComparation' => '=', 'defaultErrorMessage' => 'We are sorry, but you don\'t have access to this page. Please contact MNCAR support service for further assistance.', 'items' => $items, ); return $config;