Initialize component.

@param array $config Configurations.
@return void
11703
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->Controller = $this->_registry->getController();

        $this->_setRecipientList();
    }
316406
public function initialize(array $config)
    {
        $corePath  = Plugin::path('Core') . Configure::read('App.webroot') . '/' . Configure::read('App.lessBaseUrl');
        $cachePath = WWW_ROOT . Configure::read('App.cssBaseUrl') . Configure::read('App.cacheDir');

        $this
            ->setConfig('root_path', APP_ROOT)
            ->setConfig('cache_path', $cachePath)
            ->setConfig('root_url', Router::fullBaseUrl())
            ->setConfig('debug', Configure::read('debug'))
            ->setConfig('import_paths', [realpath($corePath) => realpath($corePath)]);

        parent::initialize($config);
    }
1145411
public static function init($config = [])
    {
        if (!self::$config) {
            self::$config = include __DIR__ ."/default-config.php";
        }
        self::$config = Arr::array_merge_multi(self::$config, $config);
    }
77116
public function initialize(array $config)
    {
        $this->setController($this->_registry->getController());

        $this->_registerPostTypesFromConfigure();

        $this->_addMenuItems();
    }
320200
public function initialize(array $config) {
		$this->setTable('tags_tags');
		$this->setDisplayField('label'); // Change to name?
		$this->addBehavior('Timestamp');

		/** @var array|bool|string|null $slugger */
		$slugger = Configure::read('Tags.slugBehavior');
		if (!$slugger) {
			return;
		}
		if ($slugger === true) {
			if (Plugin::loaded('Tools')) {
				$this->addBehavior('Tools.Slugged');
				return;
			}
			if (Plugin::loaded('Muffin/Slug')) {
				$this->addBehavior('Muffin/Slug.Slug');
				return;
			}

			throw new RuntimeException('Auto-slug behavior not found, plugin not loaded.');
		}

		$config = [];
		if (!is_string($slugger)) {
			$config = current($slugger);
			$slugger = key($slugger);
		}
		$this->addBehavior($slugger, $config);
	}
738219
public function initialize(array $config)
    {
        $this->verifyConfig();

        $this->_table->hasMany($this->getConfig('associationAlias'), [
            'className' => 'Muffin/Tokenize.Tokens',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'foreign_alias' => $this->_table->getAlias(),
                'foreign_table' => $this->_table->getTable(),
            ],
            'dependent' => true,
        ]);
    }
1341986
public function initialize(array $config)
    {
        $this->hasMany('BlockRegions', [
            'className' => 'Block.BlockRegions',
            'foreignKey' => 'block_id',
            'dependent' => true,
            'propertyName' => 'region',
        ]);
        $this->hasMany('Copies', [
            'className' => 'Block.Blocks',
            'foreignKey' => 'copy_id',
            'dependent' => true,
            'propertyName' => 'copies',
            'cascadeCallbacks' => true,
        ]);
        $this->belongsToMany('User.Roles', [
            'className' => 'User.Roles',
            'foreignKey' => 'block_id',
            'joinTable' => 'blocks_roles',
            'dependent' => false,
            'propertyName' => 'roles',
        ]);

        $this->addBehavior('Serializable', [
            'columns' => ['locale', 'settings']
        ]);
    }
420484
public function init( $config = [ ] )
    {
        foreach ( $config as $key => $value )
        {
            switch ( $key )
            {
                case 'level':
                    $this->_level = ( int ) $value;
                    break;

                case 'mailer':
                    $this->_mailer = $value;
                    break;

                case 'formatter':
                    $this->_formatter = new $value();
                    break;

                default:
                    // do nothing
                    break;
            }
        }
    }
921765
public function init( $config = NULL )
    {
        $this->config = $config;

        if ( isset( $config[ 'debug' ] ) )
        {
            $this->debug = $config[ 'debug' ];
        }

        $this->log = $this->filter( self::ON_SET_LOG_FILTER, NULL );

        $this->doAction( self::ON_COMPONENT_INIT_ACTION );
    }
50265
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('tags');
        $this->setDisplayField('tag');
        $this->setPrimaryKey('id');

        $this->belongsToMany('Posts', ['className' => 'MeCms.Posts', 'joinTable' => 'posts_tags'])
            ->setForeignKey('tag_id')
            ->setTargetForeignKey('post_id')
            ->setThrough('MeCms.PostsTags');

        $this->addBehavior('Timestamp');

        $this->_validatorClass = TagValidator::class;
    }
140262
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'toolbars' => array($this->getIdentifier()->name),
            'model'    => $this->getIdentifier()->name,
        ));

        parent::_initialize($config);
    }
1047512
public function initialize(array $config)
    {
        if (!$this->getConfig('displayField')) {
            $this->setConfig('displayField', $this->_table->getDisplayField());
        }

        if ($this->getConfig('maxLength') === null) {
            $this->setConfig(
                'maxLength',
                $this->_table->getSchema()->getColumn($this->getConfig('field'))['length']
            );
        }

        if ($this->getConfig('unique') === true) {
            $this->setConfig('unique', [$this, '_uniqueSlug']);
        }
    }
510153
public function initialize(array $config)
    {
        $this->_controller = $this->_registry->getController();
        $this->_request    = $this->_controller->request;

        parent::initialize($config);
    }
561552
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'formats' => array(
                'php'  => __NAMESPACE__.'\ObjectConfigPhp',
                'ini'  => __NAMESPACE__.'\ObjectConfigIni',
                'json' => __NAMESPACE__.'\ObjectConfigJson',
                'xml'  => __NAMESPACE__.'\ObjectConfigXml',
                'yml'  => __NAMESPACE__.'\ObjectConfigYaml',
                'yaml' => __NAMESPACE__.'\ObjectConfigYaml'
            )
        ));

        parent::_initialize($config);
    }
1096922
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->table('alt3_cake_tokens');
        $this->displayField('id');
        $this->primaryKey('id');

        $this->removeBehavior('Timestamp');
    }
769882
public function initialize(array $config): void
    {
        $this->table('model_history');
        $this->displayField('id');
        $this->primaryKey('id');
        $this->addBehavior('Timestamp');
        $this->belongsTo('Users', [
            'foreignKey' => 'user_id'
        ]);
        $this->schema()->columnType('data', 'json');
        $this->schema()->columnType('context', 'json');
    }
592682
public function initialize(array $config)
    {
        parent::initialize($config);

        if (isset($config['emptyValues'])) {
            $this->setConfig('emptyValues', $config['emptyValues'], false);
        }

        $collectionClass = $this->getConfig('collectionClass');
        if ($collectionClass) {
            $this->_collectionClass = $collectionClass;

            return;
        }

        $defaultCollectionClass = sprintf(
            '%s\Model\Filter\%sCollection',
            Configure::read('App.namespace'),
            $this->getTable()->getAlias()
        );
        if (class_exists($defaultCollectionClass)) {
            $this->_collectionClass = $defaultCollectionClass;
        }
    }