public function postSave()
    {
        $oInput   = Factory::service('Input');
        $aPrefRaw = array_filter((array) $oInput->post('preferences'));
        $oPref    = new \stdClass();

        foreach ($aPrefRaw as $sModule => $aOptions) {
            $oPref->{$sModule}       = new \stdClass();
            $oPref->{$sModule}->open = stringToBoolean($aOptions['open']);
        }

        $oAdminModel = Factory::model('Admin', 'nails/module-admin');
        $oAdminModel->setAdminData('nav_state', $oPref);
        return Factory::factory('ApiResponse', 'nails/module-api');
    }
public function postSave()
    {
        $oInput   = Factory::service('Input');
        $aPrefRaw = array_filter((array) $oInput->post('preferences'));
        $oPref    = new \stdClass();

        foreach ($aPrefRaw as $sModule => $aOptions) {
            $oPref->{$sModule}       = new \stdClass();
            $oPref->{$sModule}->open = stringToBoolean($aOptions['open']);
        }

        $oAdminModel = Factory::model('Admin', 'nails/module-admin');
        $oAdminModel->setAdminData('nav_state', $oPref);
        return Factory::factory('ApiResponse', 'nails/module-api');
    }
public function postSave ( ) { $ oInput = Factory :: service ( 'Input' ) ; $ aPrefRaw = array_filter ( ( array ) $ oInput -> post ( 'preferences' ) ) ; $ oPref = new \ stdClass ( ) ; foreach ( $ aPrefRaw as $ sModule => $ aOptions ) { $ oPref -> { $ sModule } = new \ stdClass ( ) ; $ oPref -> { $ sModule } -> open = stringToBoolean ( $ aOptions [ 'open' ] ) ; } $ oAdminModel = Factory :: model ( 'Admin' , 'nails/module-admin' ) ; $ oAdminModel -> setAdminData ( 'nav_state' , $ oPref ) ; return Factory :: factory ( 'ApiResponse' , 'nails/module-api' ) ; }
Saves the user's admin nav preferences
@return \Nails\Api\Factory\ApiResponse
Saves the user s admin nav preferences