Initialize method

@param array $config The configuration for the Table.
@return void
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');
    }
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 );
    }
1137129
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setController($this->_registry->getController());

        $this->_registerFromConfigure();
    }
1339251
public function initialize(array $config)
    {
        $table = Configure::read('Muffin/Tokenize.table', self::DEFAULT_TABLE);

        $this->setTable($table);
        $this->setPrimaryKey('id');
        $this->setDisplayField('token');

        $this->addBehavior('Timestamp');
    }
658474
public function initialize(array $config)
    {
        parent::initialize($config);

        if (Plugin::getCollection()->has('Assets')) {
            $this->Asset = $this->getView()->loadHelper('Assets.Asset');
        } else {
            $this->Asset = clone $this->Html;
        }
    }
1351455
public function initialize(array $config)
    {
        $this->table('cms_pages');

        $this->hasOne('Collections', [
            'className' => 'Wasabi/Cms.Collections',
            'dependent' => true
        ]);

        $this->hasMany('Contents', [
            'className' => 'Wasabi/Cms.Contents',
            'foreignKey' => 'page_id',
            'dependent' => true
        ]);

        $this->hasMany('Current', [
            'className' => 'Wasabi/Cms.Contents',
            'foreignKey' => 'page_id',
            'finder' => 'Current'
        ]);

        $this->hasMany('Attributes', [
            'className' => 'Wasabi/Cms.Attributes',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'model' => 'Wasabi/Cms.Pages',
                'language_id' => Wasabi::contentLanguage()->id
            ],
            'dependent' => true
        ]);

        $this->hasMany('Routes', [
            'className' => 'Wasabi/Core.Routes',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'model' => 'Wasabi/Cms.Pages'
            ],
            'dependent' => true
        ]);

        $this->addBehavior('Translate', self::$translateOptions);

        $this->addBehavior('Tree');
        $this->addBehavior('Timestamp');

        $this->locale(Wasabi::contentLanguage()->iso2);
    }
496787
public function initialize(array $config) {
        parent::initialize($config);

        // set request
        $this->ctrl = $this->getController();
        $this->cookies = (new CookieCollection())->createFromServerRequest($this->ctrl->getRequest());
    }
451971
public static function init(array $config) {
        static::$config = $config;
        static::checkConfig($config);

        static::fetchSession();

        if (static::$userId === null)
            static::$userId = new UserIdentity();

        static::$inject = include CONFIG . 'inject.php';
    }
255981
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'method'  => self::GET,
            'url'     => '',
            'headers' => array()
        ));

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

        $this->setTable('calendar_events');
        $this->setDisplayField('title');
        $this->setPrimaryKey('id');

        $this->addBehavior('Timestamp');
        $this->addBehavior('Muffin/Trash.Trash');

        $this->belongsTo('Calendars', [
            'foreignKey' => 'calendar_id',
            'joinType' => 'INNER',
            'className' => 'Qobo/Calendar.Calendars'
        ]);

        $this->belongsToMany('CalendarAttendees', [
            'joinTable' => 'events_attendees',
            'foreignKey' => 'calendar_event_id',
        ]);

        /** @var \Qobo\Calendar\Model\Table\CalendarsTable $table */
        $table = TableRegistry::get('Qobo/Calendar.Calendars');
        $this->Calendars = $table;
    }
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);
    }
918499
static public function setConfig(array $config)
    {
        foreach ($config as $k => $v) {
            self::$_config[$k] = $v;
        }
    }
249758
public function initialize(array $config = []) {
		$config = $this->_config;

		if (empty($config['bits'])) {
			$config['bits'] = Inflector::variable(Inflector::pluralize($config['field']));
		}

		$entity = $this->_table->newEntity();

		if (is_callable($config['bits'])) {
			$config['bits'] = call_user_func($config['bits']);
		} elseif (is_string($config['bits']) && method_exists($entity, $config['bits'])) {
			$method = $config['bits'];
			$config['bits'] = version_compare(PHP_VERSION, '7.0', '<') ? $entity->$method() : $entity::$method();
		} elseif (is_string($config['bits']) && method_exists($this->_table, $config['bits'])) {
			$table = $this->_table;
			$method = $config['bits'];
			$config['bits'] = version_compare(PHP_VERSION, '7.0', '<') ? $table->$method() : $table::$method();
		} elseif (!is_array($config['bits'])) {
			$config['bits'] = false;
		}
		if (empty($config['bits'])) {
			$method = Inflector::variable(Inflector::pluralize($config['field'])) . '()';
			throw new RuntimeException('Bits not found for field ' . $config['field'] . ', expected pluralized static method ' . $method . ' on the entity.');
		}
		ksort($config['bits'], SORT_NUMERIC);

		$this->_config = $config;
	}
572098
public function initialize(array $config = []) {
		$config += (array)Configure::read('Captcha');
		parent::initialize($config);

		$engine = $this->getConfig('engine');
		$this->_engine = new $engine($this->getConfig());
		$this->_captchasTable = TableRegistry::get('Captcha.Captchas');
	}
92249
public function initialize(array $config)
    {
        parent::initialize($config);

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

        $this->addBehavior('Timestamp');
    }
841888
public function initialize(array $config)
    {
        $this->setTable($this->tablePrefix . $this->getTable());
        // HttpClient needs special header HTTP_X_UNIT_TEST_MODE => set in AppCakeTestCase::initHttpClient()
        if (isset($_SERVER['HTTP_X_UNIT_TEST_MODE'])
            || (php_sapi_name() == 'cli' && $_SERVER['argv'][0] && preg_match('/phpunit/', $_SERVER['argv'][0]))) {
            $this->setConnection(ConnectionManager::get('test'));
        }
        parent::initialize($config);
    }
905735
public function setConfig(array $config)
    {
        foreach ($config as $name => $value) {
            $setter = 'set' . ucfirst($name);

            call_user_func_array(array($this, $setter), array($value));
        }
    }