Set those settings needed for the detailed display

@return \Gems_Model_AppointmentModel
2880
public function applyDetailSettings()
    {
        $this->resetOrder();

        $agenda   = $this->loader->getAgenda();
        $dbLookup = $this->util->getDbLookup();
        $empty    = $this->util->getTranslated()->getEmptyDropdownArray();

        $this->setIfExists('gec_id_organization', 'label', $this->_('Organization'),
                'elementClass', 'Exhibitor',
                'multiOptions', $empty + $dbLookup->getOrganizations());

        $this->setIfExists('gec_status',         'label', $this->_('Status'),
                'multiOptions', $agenda->getEpisodeStatusCodes());

        $this->setIfExists('gec_startdate',      'label', $this->_('Start date'),
                'dateFormat',  'dd-MM-yyyy',
                'description', $this->_('dd-mm-yyyy'));
        $this->setIfExists('gec_enddate',        'label', $this->_('End date'),
                'dateFormat',  'dd-MM-yyyy',
                'description', $this->_('dd-mm-yyyy'));

        $this->setIfExists('gec_id_attended_by', 'label', $this->_('With'),
                'multiOptions', $empty + $agenda->getHealthcareStaff());

        $this->setIfExists('gec_subject',        'label', $this->_('Subject'));
        $this->setIfExists('gec_comment',        'label', $this->_('Comment'));
        $this->setIfExists('gec_diagnosis',      'label', $this->_('Diagnosis'));
        $this->set('appointment_count',     'label', $this->_('Appointments'));

        $jsonType = new JsonData(10);
        $jsonType->apply($this, 'gec_diagnosis_data', true);
        $jsonType->apply($this, 'gec_extra_data',     true);

        if ($this->currentUser->hasPrivilege('pr.episodes.rawdata')) {
            $this->setIfExists('gec_diagnosis_data', 'label', $this->_('Diagnosis data'));
            $this->setIfExists('gec_extra_data',     'label', $this->_('Extra data'));
        }

        $this->refreshGroupSettings();

        return $this;
    }
200277
public function get_setting() {
        global $CFG;

        $manager = get_emoticon_manager();

        $config = $this->config_read($this->name);
        if (is_null($config)) {
            return null;
        }

        $config = $manager->decode_stored_config($config);
        if (is_null($config)) {
            return null;
        }

        return $this->prepare_form_data($config);
    }
353065
protected function setOverrides()
    {
        $config = $this->app['config']->get('cartalyst.sentinel');

        $users = $config['users']['model'];

        $roles = $config['roles']['model'];

        $persistences = $config['persistences']['model'];

        if (class_exists($users)) {
            if (method_exists($users, 'setRolesModel')) {
                forward_static_call_array([ $users, 'setRolesModel' ], [ $roles ]);
            }

            if (method_exists($users, 'setPersistencesModel')) {
                forward_static_call_array([ $users, 'setPersistencesModel' ], [ $persistences ]);
            }

            if (method_exists($users, 'setPermissionsClass')) {
                forward_static_call_array([ $users, 'setPermissionsClass' ], [ $config['permissions']['class'] ]);
            }
        }

        if (class_exists($roles) && method_exists($roles, 'setUsersModel')) {
            forward_static_call_array([ $roles, 'setUsersModel' ], [ $users ]);
        }

        if (class_exists($persistences) && method_exists($persistences, 'setUsersModel')) {
            forward_static_call_array([ $persistences, 'setUsersModel' ], [ $users ]);
        }
    }
1223410
public function getSettings()
    {
        $settings = [];
        $settings['page'] = $this->getPage();
        $settings['limit'] = $this->getLimit();
        $settings['orders'] = $this->getOrder();
        return $settings;
    }
393663
public function set(): PageInterface
    {
        $hook = $this->isNetwork() ? 'network_admin_menu' : 'admin_menu';

        // Action for page display.
        $this->action->add($hook, [$this, 'build']);
        // Action for page settings.
        $this->action->add('admin_init', [$this, 'configureSettings']);

        return $this;
    }
16858
protected function createModel()
    {
        if (! $this->model instanceof EpisodeOfCareModel) {
            $this->model = $this->loader->getModels()->createEpisodeOfCareModel();

            $this->model->applyBrowseSettings();
        }

        if ($this->calSearchFilter instanceof AppointmentFilterInterface) {
            $this->model->set('gr2o_patient_nr', 'label', $this->_('Respondent nr'), 'order', 3);

            \Gems_Model_RespondentModel::addNameToModel($this->model, $this->_('Name'));

            $this->model->set('name', 'order', 6);
        }

        // \MUtil_Model::$verbose = true;
        return $this->model;
    }
34674
protected function loadRoundSettings()
    {
        $rounds = $this->getRoundsListAndSetDefault();
        $model  = $this->getModel();
        $model->set('gto_round_order', 'multiOptions', $rounds, 'size', count($rounds));

        if (count($rounds) === 1) {
            $model->set('gto_round_order', 'elementClass', 'Exhibitor');
        }

        if (! isset($this->formData['gto_round_order'], $rounds[$this->formData['gto_round_order']])) {
            $this->formData['gto_round_order'] = $this->defaultRound;
        }
        if (! isset($rounds[$this->formData['gto_round_order']])) {
            reset($rounds);
            $this->formData['gto_round_order'] = key($rounds);
        }
    }
392644
public function actionIndex()
    {
        $model = $this->getModel();

        $data = Yii::$app->request->post($model->formName());
        if (empty($data)) {
            $data = $this->getThemeSettingsStorage()->get();
        }

        if (Yii::$app->request->getIsPost() && $model->load($data) && $model->validate()) {
            $this->getThemeSettingsStorage()->set($model);
            $this->setGlobalOrientation($model->filterOrientation);
            Yii::$app->session->setFlash('success', Yii::t('hiqdev.thememanager', 'Layout settings saved.'));
        }

        if (Yii::$app->request->isAjax) {
            return $this->renderAjax('//settings/_form', compact('model'));
        }

        return $this->render('index', compact('model'));
    }
691272
private function setLayout()
    {
        $this->layout = Html::tag('div', "{items}", ['class' => 'table-responsive']) .
            Html::tag(
                'div',
                Html::tag('div', "{summary}", ['class' => 'pagination-summary']) .
                Html::tag('div', "{pager}", ['class' => 'pagination-wrap']),
                ['class' => 'pagination-box']
            );
    }
1284428
public function getSettingsFields()
    {
        $fields = parent::getSettingsFields();

        $settings = FieldGroup::create(
            FieldGroup::create(
                NumericField::create('Width', _t('CarouselPage.db_Width')),
                NumericField::create('Height', _t('CarouselPage.db_Height')),
                CheckboxField::create('Captions', _t('CarouselPage.db_Captions'))
            )
        );
        $settings->setName('Carousel');
        $settings->setTitle(_t('CarouselPage.SINGULARNAME'));
        $fields->addFieldToTab('Root.Settings', $settings);

        return $fields;
    }
24161
protected function setModel()
    {
        if (count($this->models) > 1) {
            $this->info('You need to select which model you want to update');
            foreach ($this->models as $key => $value) {
                $this->info("[$key] $value");
            }
            $askModel = $this->ask('Which model would you like to use?', array_keys($this->models)[0]);

            if (!array_key_exists($askModel, $this->models)) {
                throw new InvalidModelException('The input you gave is not valid');
            }

            $this->model = new $this->models[$askModel];
        } else {
            $this->model = new $this->models[array_keys($this->models)[0]];
        }
    }
275150
public function postSettings()
    {
        $setting = app(Repository::class);

        if (Binput::get('remove_banner') === '1') {
            $setting->set('app_banner', null);
        }

        $parameters = Binput::all();

        if (isset($parameters['header'])) {
            if ($header = Binput::get('header', null, false, false)) {
                $setting->set('header', $header);
            } else {
                $setting->delete('header');
            }
        }

        if (isset($parameters['footer'])) {
            if ($footer = Binput::get('footer', null, false, false)) {
                $setting->set('footer', $footer);
            } else {
                $setting->delete('footer');
            }
        }

        if (isset($parameters['stylesheet'])) {
            if ($stylesheet = Binput::get('stylesheet', null, false, false)) {
                $setting->set('stylesheet', $stylesheet);
            } else {
                $setting->delete('stylesheet');
            }
        }

        if (Binput::hasFile('app_banner')) {
            $this->handleUpdateBanner($setting);
        }

        $excludedParams = [
            '_token',
            'app_banner',
            'remove_banner',
            'header',
            'footer',
            'stylesheet',
        ];

        try {
            foreach (Binput::except($excludedParams) as $settingName => $settingValue) {
                if ($settingName === 'app_analytics_pi_url') {
                    $settingValue = rtrim($settingValue, '/');
                }

                $setting->set($settingName, $settingValue);
            }
        } catch (Exception $e) {
            return Redirect::back()->withErrors(trans('dashboard.settings.edit.failure'));
        }

        if (Binput::has('app_locale')) {
            Lang::setLocale(Binput::get('app_locale'));
        }

        if (Binput::has('always_authenticate')) {
            Artisan::call('route:clear');
        }

        return Redirect::back()->withSuccess(trans('dashboard.settings.edit.success'));
    }
309679
public function applyEditSettings()
    {
        $this->applyDetailSettings();
        $this->resetOrder();

        $yesNo = $this->util->getTranslated()->getYesNo();

        // GENERAL TAB
        $this->set('gor_name',
                'size', 25,
                'validator', $this->createUniqueValidator('gor_name')
                );
        $this->set('gor_location',
                'size', 50,
                'maxlength', 255
                );
        $this->set('gor_task',
                'size', 25);
        $this->set('gor_url',
                'size', 50
                );
        $this->setIfExists('gor_url_base',
                'size', 50,
                'filter', 'TrailingSlash'
                );
        $this->setIfExists('gor_code',
                'size', 10
                );
        $this->set('gor_provider_id');
        $this->setIfExists('gor_active',
                'elementClass', 'Checkbox'
                );

        // EMAIL TAB
        $this->set('gor_contact_name', 'tab', $this->_('Email') . ' & ' . $this->_('Token'),
                'order', $this->getOrder('gor_active') + 1000,
                'size', 25
                );
        $this->set('gor_contact_email',
                'size', 50,
                'validator', 'SimpleEmail'
                );
        $this->set('gor_mail_watcher', 'label', $this->_('Check cron job mail'),
                    'description', $this->_('If checked the organization contact will be mailed when the cron job does not run on time.'),
                    'elementClass', 'Checkbox',
                    'multiOptions', $yesNo
                    );
        $this->set('gor_welcome',
                'elementClass', 'Textarea',
                'rows', 5
                );
        $this->set('gor_signature',
                'elementClass', 'Textarea',
                'rows', 5
                );
        $this->set('gor_create_account_template');
        $this->set('gor_reset_pass_template');

        // ACCESS TAB
        $this->set('gor_has_login',  'tab', $this->_('Access'),
                'order', $this->getOrder('gor_reset_pass_template') + 1000,
                'elementClass', 'CheckBox'
                );
        $this->set('gor_add_respondents',
                'elementClass', 'CheckBox'
                );
        $this->set('gor_has_respondents',
                'elementClass', 'Exhibitor'
                );
        $this->set('gor_respondent_group');
        $this->set('gor_accessible_by',
                'elementClass', 'MultiCheckbox'
                );
        $this->set('allowed',
                'label', $this->_('Can access'),
                'elementClass', 'Html'
                );

        $this->setIfExists('gor_allowed_ip_ranges',
            'elementClass', 'Textarea',
            'rows', 4,
            'validator', new \Gems_Validate_IPRanges()
            );
        $this->setIfExists('gor_user_class');

        $definitions = $this->get('gor_user_class', 'multiOptions');
        if ($definitions && (count($definitions) > 1)) {
            reset($definitions);
            // MD: Removed onchange because it does not play nice with the processAfterLoad and save methods in this class
            //     @@TODO: See if we can enable it when these methods are changed into a dependency
            $this->setIfExists('gor_user_class', 'default', key($definitions), 'required', true/*, 'onchange', 'this.form.submit();'*/);
        }

        // INTERFACE TAB
        $this->setIfExists('gor_respondent_edit', 'tab', $this->_('Interface'),
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_show',
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_subscribe',
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_unsubscribe',
                'default', '',
                'elementClass', 'Radio'
                );

        $this->setIfExists('gor_token_ask',
                'default', 'Gems\\Screens\\Token\\Ask\\ProjectDefaultAsk',
                'elementClass', 'Radio'
                );

        $this->setIfExists('gor_resp_change_event',
                'order', $this->getOrder('gor_user_class') + 1000
                );
        $this->setIfExists('gor_iso_lang',
                'order', $this->getOrder('gor_user_class') + 1010,
                'default', $this->project->getLocaleDefault()
                );
        if ($this->_styles) {
            $this->setIfExists('gor_style');
        }
        return $this;
    }
1201242
protected function _setDescription()
    {
        if (empty($this->viewVars['description_for_layout'])) {
            $description = option('site_description');
            $this->assign('description', $description);
            $this->set('description_for_layout', $description);
            $this->append('meta', $this->Html->meta('description', $description));
        } else {
            $this->assign('description', $this->viewVars['description_for_layout']);
        }
    }
67080
private function setSettings()
    {
        if (!empty($this->settings['url']) && is_string($this->settings['url'])) {
            $this->url = $this->settings['url'];
        } if (!empty($this->settings['version']) && is_string($this->settings['version'])) {
            $this->version = $this->settings['version'];
        } if (isset($this->settings['call']) && is_bool($this->settings['call'])) {
            $this->call = $this->settings['call'];
        } if (isset($this->settings['secured']) && is_bool($this->settings['secured'])) {
            $this->secure = $this->settings['secured'];
        }
        $this->changed = false;
    }
269819
public function setModel($model, $display_field = null)
    {
        if ($model instanceof Model) {
            return AbstractObject::setModel($model);
        }

        $this->model_name = is_string($model) ? $model : get_class($model);
        $this->model_name = (string) $this->app->normalizeClassName($this->model_name, 'Model');

        if ($display_field) {
            $this->display_field = (string) $display_field;
        }

        if ($display_field !== false) {
            $this->owner->addExpression($this->getDereferenced())
                ->set(array($this, 'calculateSubQuery'))
                ->caption((string) $this->caption());
        }

        $this->system(true);
        $this->editable(true);
        $this->visible(false);

        return $this;
    }
52928
public function onApplySetup()
    {
        if (($visibleColumns = post('visible_columns')) && is_array($visibleColumns)) {
            $this->columnOverride = $visibleColumns;
            $this->putSession('visible', $this->columnOverride);
        }

        $this->recordsPerPage = post('records_per_page', $this->recordsPerPage);
        $this->putSession('order', post('column_order'));
        $this->putSession('per_page', $this->recordsPerPage);
        return $this->onRefresh();
    }