public function indexAction()
    {
        $group = $this->currentUser->getGroup();
        if ($group && $this->enableScreens) {
            $browse = $group->getRespondentBrowseScreen();

            if ($browse) {
                if ($browse instanceof ProcessModelInterface) {
                    $browse->processModel($this->getModel());
                }

                // All are arrays, so easy to set
                $this->autofilterParameters = $browse->getAutofilterParameters() + $this->autofilterParameters;
                $this->indexParameters      = $browse->getStartStopParameters() + $this->indexParameters;

                $autoSnippets = $browse->getAutofilterSnippets();
                if (false !== $autoSnippets) {
                    $this->autofilterSnippets = $autoSnippets;
                }
                $startSnippets = $browse->getStartSnippets();
                if (false !== $startSnippets) {
                    $this->indexStartSnippets = $startSnippets;
                }
                $stopSnippets = $browse->getStopSnippets();
                if (false !== $stopSnippets) {
                    $this->indexStopSnippets = $stopSnippets;
                }
            }
        }
        if ($this->currentUser->hasPrivilege('pr.respondent.multiorg') ||
                $this->currentOrganization->canHaveRespondents()) {
            parent::indexAction();
        } else {
            $this->addSnippet('Organization\\ChooseOrganizationSnippet');
        }
    }
public function indexAction()
    {
        $group = $this->currentUser->getGroup();
        if ($group && $this->enableScreens) {
            $browse = $group->getRespondentBrowseScreen();

            if ($browse) {
                if ($browse instanceof ProcessModelInterface) {
                    $browse->processModel($this->getModel());
                }

                // All are arrays, so easy to set
                $this->autofilterParameters = $browse->getAutofilterParameters() + $this->autofilterParameters;
                $this->indexParameters      = $browse->getStartStopParameters() + $this->indexParameters;

                $autoSnippets = $browse->getAutofilterSnippets();
                if (false !== $autoSnippets) {
                    $this->autofilterSnippets = $autoSnippets;
                }
                $startSnippets = $browse->getStartSnippets();
                if (false !== $startSnippets) {
                    $this->indexStartSnippets = $startSnippets;
                }
                $stopSnippets = $browse->getStopSnippets();
                if (false !== $stopSnippets) {
                    $this->indexStopSnippets = $stopSnippets;
                }
            }
        }
        if ($this->currentUser->hasPrivilege('pr.respondent.multiorg') ||
                $this->currentOrganization->canHaveRespondents()) {
            parent::indexAction();
        } else {
            $this->addSnippet('Organization\\ChooseOrganizationSnippet');
        }
    }
public function indexAction ( ) { $ group = $ this -> currentUser -> getGroup ( ) ; if ( $ group && $ this -> enableScreens ) { $ browse = $ group -> getRespondentBrowseScreen ( ) ; if ( $ browse ) { if ( $ browse instanceof ProcessModelInterface ) { $ browse -> processModel ( $ this -> getModel ( ) ) ; } // All are arrays, so easy to set $ this -> autofilterParameters = $ browse -> getAutofilterParameters ( ) + $ this -> autofilterParameters ; $ this -> indexParameters = $ browse -> getStartStopParameters ( ) + $ this -> indexParameters ; $ autoSnippets = $ browse -> getAutofilterSnippets ( ) ; if ( false !== $ autoSnippets ) { $ this -> autofilterSnippets = $ autoSnippets ; } $ startSnippets = $ browse -> getStartSnippets ( ) ; if ( false !== $ startSnippets ) { $ this -> indexStartSnippets = $ startSnippets ; } $ stopSnippets = $ browse -> getStopSnippets ( ) ; if ( false !== $ stopSnippets ) { $ this -> indexStopSnippets = $ stopSnippets ; } } } if ( $ this -> currentUser -> hasPrivilege ( 'pr.respondent.multiorg' ) || $ this -> currentOrganization -> canHaveRespondents ( ) ) { parent :: indexAction ( ) ; } else { $ this -> addSnippet ( 'Organization\\ChooseOrganizationSnippet' ) ; } }
Overrule default index for the case that the current
organization cannot have users.
Overrule default index for the case that the current organization cannot have users .