Performs the necessary overrides.

@return void
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 ]);
        }
    }
572777
public function defaults()
    {
        foreach ($this->defaults as $name => $code) {
            $this->add($name, $code);
        }
    }
481827
public function applyConfigOverrides()
    {
        // init
        $config_items = [];

        foreach ($this->settings_default as $key => $value) {
            if (ee()->config->item($key)) {
                $config_items[$key] = ee()->config->item($key);
            }
        }

        if (is_array($this->settings)) {
            $this->settings = array_merge($this->settings, $config_items);
        }
    }
282125
public function execute()
    {
        parent::execute();

        return $this->service->_buildTransaction(
            'OVERRIDE',
            $this->check,
            $this->amount,
            $this->clientTransactionId
        );
    }
424894
public function handle()
    {
        $class = $this->argument('class');
        $real = ! $this->option('cached');
        $force = $this->option('force');
        $index = $this->option('index');
        $prefix = $this->option('prefix');
        
        if ($class) {
            $overrides = app()->make(Overrides::class);

            if ($prefix !== '') {
                $class = $overrides->addPrefix($class, $prefix);
            }

            $overrides->makeOverrideClass($class, $real, $force);

            if ($index) 
                $overrides->indexOverrides();
        }

        return false;
    }
1346615
protected function defaults()
    {
        parent::defaults();

        if ($this->isMissingLeft()) {
            $this->left();
        }

        if ($this->isMissingRight()) {
            $this->right();
        }
    }
335726
public function overrideBlockTypeContainerSettings()
    {
        if (!isset($this->cbOverrideBlockTypeContainerSettings) || !$this->cbOverrideBlockTypeContainerSettings) {
            $this->cbOverrideBlockTypeContainerSettings = 0;
        }

        return $this->cbOverrideBlockTypeContainerSettings;
    }
296668
public function populateDefaults()
    {
        $defaults = $this->owner->config()->get('defaults');

        // Set if comments should be enabled by default
        if (isset($defaults['ProvideComments'])) {
            $this->owner->ProvideComments = $defaults['ProvideComments'];
        } else {
            $this->owner->ProvideComments = $this->owner->getCommentsOption('enabled') ? 1 : 0;
        }

        // If moderation options should be configurable via the CMS then
        if (isset($defaults['ModerationRequired'])) {
            $this->owner->ModerationRequired = $defaults['ModerationRequired'];
        } elseif ($this->owner->getCommentsOption('require_moderation')) {
            $this->owner->ModerationRequired = 'Required';
        } elseif ($this->owner->getCommentsOption('require_moderation_nonmembers')) {
            $this->owner->ModerationRequired = 'NonMembersOnly';
        } else {
            $this->owner->ModerationRequired = 'None';
        }

        // Set login required
        if (isset($defaults['CommentsRequireLogin'])) {
            $this->owner->CommentsRequireLogin = $defaults['CommentsRequireLogin'];
        } else {
            $this->owner->CommentsRequireLogin = $this->owner->getCommentsOption('require_login') ? 1 : 0;
        }
    }
792274
public function overrideMode($mode)
    {
        self::validateMode($mode);
        $this->mode = $mode;
        $this->overriddenMode = true;
    }
563084
private function overwriteConfig()
    {
        foreach (array_keys($this->config()) as $config) {
            $this->config = $config;

            $this->configToEnv();
        }
    }
1051461
public function overrideConfirm()
    {
        if ($this->overrideSystemConfirm) {

            $ok = Yii::t('noty', 'Ok');
            $cancel = Yii::t('noty', 'Cancel');

            $this->view->registerJs("
                yii.confirm = function(message, ok, cancel) {
                
                    notie.confirm(message, '$ok', '$cancel', function() {
                        !ok || ok();
                    });
                    
                }
            ");
        }
    }
1151882
public function apply()
    {
        if ($this->config->hasKey(self::REGISTER)) {
            $registerConfig = $this->config->getSubConfig(self::REGISTER);
            $this->register($registerConfig->getArrayCopy());
        }

        if ($this->config->hasKey(self::UNREGISTER)) {
            $unregisterConfig = $this->config->getSubConfig(self::UNREGISTER);
            $this->unregister($unregisterConfig->getArrayCopy());
        }

        if ($this->config->hasKey(self::DEFAULTLAYOUT)) {
            $this->setDefault($this->config->getKey(self::DEFAULTLAYOUT));
        }
    }
1225551
def accept_override(self):
        """"""
        conflicts = self.check_conflicts()
        if conflicts:
            for shortcut in conflicts:
                shortcut.key = ''
        self.accept()
285826
protected function registerOverrides()
    {
        $this->app->singleton('redis', function ($app) {
            return $app->make('redis-sentinel');
        });

        $this->app->bind('redis.connection', function ($app) {
            return $app->make('redis-sentinel.manager')->connection();
        });
    }
1251959
public function build()
    {
        $builder = OverrideBuilderFactory::create(
            $this->builder,
            $this->namingStrategy,
            $this->name,
            $this->callback
        );

        $builder->build();
    }
854424
protected function overrideViewPath()
    {
        $this->app->bind('view.finder', function ($app) {
            $defaultThemePath = $app['config']['themes.path'].'/'.$app['config']['themes.default'].'/views';

            if (is_dir($defaultThemePath)) {
                $paths = [$defaultThemePath];
            } else {
                $paths = $app['config']['view.paths'];
            }

            return new FileViewFinder($app['files'], $paths);
        });
    }
367891
protected function overrideParams($module, $override)
    {
        $params = json_decode($module->params, true);

        if (!is_array($params)) {
            $params = [];
        }

        $params = array_merge($params, $override);
        $module->params = json_encode($params);
    }