Cake\ORM\Table::initialize PHP Method

initialize() public method

You can use this method to define associations, attach behaviors define validation and do any other initialization logic you need. public function initialize(array $config) { $this->belongsTo('Users'); $this->belongsToMany('Tagging.Tags'); $this->primaryKey('something_else'); }
public initialize ( array $config ) : void
$config array Configuration options passed to the constructor
return void
    public function initialize(array $config)
    {
    }

Usage Example

 /**
  * Initialize method
  *
  * @param array $config The configuration for the Table.
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->table('clients');
     $this->displayField('id_client');
     $this->primaryKey('id_client');
 }
All Usage Examples Of Cake\ORM\Table::initialize