Model/Behavior/InitConfigBehavior.php
public function setup(Model $model, $config = []) {
		if (!isset($this->settings[$model->alias])) {
			$this->settings[$model->alias] = [
				'pluginName' => null,
				'checkPath' => null,
				'configFile' => null,
				'path' => null,
			];
		}
		$this->settings[$model->alias] = array_merge($this->settings[$model->alias], $config);
		extract($this->settings[$model->alias]);
		$this->_initConfig = new InitConfig($pluginName, $checkPath, $configFile);
		if (!empty($path)) {
			$this->_initConfig->path = $path;
		}

		$this->_initConfig->initConfig();
	}
public function setup(Model $model, $config = []) {
		if (!isset($this->settings[$model->alias])) {
			$this->settings[$model->alias] = [
				'pluginName' => null,
				'checkPath' => null,
				'configFile' => null,
				'path' => null,
			];
		}
		$this->settings[$model->alias] = array_merge($this->settings[$model->alias], $config);
		extract($this->settings[$model->alias]);
		$this->_initConfig = new InitConfig($pluginName, $checkPath, $configFile);
		if (!empty($path)) {
			$this->_initConfig->path = $path;
		}

		$this->_initConfig->initConfig();
	}
public function setup ( Model $ model , $ config = [ ] ) { if ( ! isset ( $ this -> settings [ $ model -> alias ] ) ) { $ this -> settings [ $ model -> alias ] = [ 'pluginName' => null , 'checkPath' => null , 'configFile' => null , 'path' => null , ] ; } $ this -> settings [ $ model -> alias ] = array_merge ( $ this -> settings [ $ model -> alias ] , $ config ) ; extract ( $ this -> settings [ $ model -> alias ] ) ; $ this -> _initConfig = new InitConfig ( $ pluginName , $ checkPath , $ configFile ) ; if ( ! empty ( $ path ) ) { $ this -> _initConfig -> path = $ path ; } $ this -> _initConfig -> initConfig ( ) ; }
Setup this behavior with the specified configuration settings.

Actions:
- Initialization configuration of plugin.

@param Model $model Model using this behavior
@param array $config Configuration settings for $model
@return void
Setup this behavior with the specified configuration settings .