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 |
/** * 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'); }
/** * @param array $config Config * @return void */ public function initialize(array $config) { $this->table('oauth_refresh_tokens'); $this->primaryKey('refresh_token'); $this->belongsTo('AccessTokens', ['className' => 'OAuthServer.AccessTokens', 'foreignKey' => 'oauth_token']); parent::initialize($config); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('deporte_actividad'); $this->displayField('iddeporte'); $this->primaryKey('iddeporte'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('received_messages'); $this->displayField('id'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('product_type'); $this->displayField('name'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('financial_statement'); $this->displayField('emiten_code'); $this->primaryKey(['emiten_code', 'period']); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('registro_deportivo'); $this->displayField('idregistro_deportivo'); $this->primaryKey('idregistro_deportivo'); }
public function initialize(array $config) { parent::initialize($config); $this->table('event_guests'); $this->belongsTo('Phonebooks'); $this->belongsTo('Events'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('template_emails'); $this->displayField('title'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('plays'); $this->displayField('hometeam'); $this->primaryKey(['hometeam', 'awayteam', 'dateOfGame']); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('website_slider'); $this->displayField('id'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('item_class'); $this->displayField('name'); $this->primaryKey('classID'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('employee'); $this->displayField('name'); $this->primaryKey('ID'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('searchresults'); $this->displayField('item_name'); $this->primaryKey('item_name'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('skill'); $this->displayField('RoleID'); $this->primaryKey(['RoleID', 'ID']); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('deportes_por_dedicacion'); $this->displayField('iddeportes_por_recreacion'); $this->primaryKey('iddeportes_por_recreacion'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('subscriber'); $this->displayField('userName'); $this->primaryKey('userName'); }
/** * @param array $config Config * @return void */ public function initialize(array $config) { $this->table('oauth_session_scopes'); $this->belongsTo('Sessions', ['className' => 'OAuthServer.Sessions']); $this->belongsTo('Scopes', ['className' => 'OAuthServer.Scopes']); parent::initialize($config); }
/** * @param array $config Config * @return void */ public function initialize(array $config) { $this->table('oauth_auth_code_scopes'); $this->belongsTo('AuthCodes', ['className' => 'OAuthServer.AuthCodes', 'foreignKey' => 'auth_code', 'propertyName' => 'code']); $this->belongsTo('Scopes', ['className' => 'OAuthServer.Scopes']); parent::initialize($config); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('comments'); $this->addBehavior('Timestamp'); $this->belongsTo('Users', ['className' => Configure::read('Plugin.Comments.users.className'), 'foreignKey' => 'user_id', 'joinType' => 'Left']); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('headquarters'); $this->displayField('name'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('fornecedores'); $this->displayField('nome'); $this->primaryKey('id'); }
/** * @param array $config Config * @return void */ public function initialize(array $config) { $this->table('oauth_access_token_scopes'); $this->belongsTo('AccessTokens', ['className' => 'OAuthServer.AccessTokens', 'foreignKey' => 'oauth_token']); $this->belongsTo('Scopes', ['className' => 'OAuthServer.Scopes']); parent::initialize($config); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('runningback'); $this->displayField('pid'); $this->primaryKey('pid'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('categories'); $this->displayField('CatName'); $this->primaryKey('CatId'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('cardpaymentdetails'); $this->displayField('id'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('notification'); $this->displayField('ID'); $this->primaryKey('ID'); }
public function initialize(array $config) { parent::initialize($config); $this->displayField('title'); $this->belongsTo('Books'); $this->hasMany('Distributions'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('balance'); $this->displayField('id'); $this->primaryKey('id'); }
/** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->table('uk_postcodes'); $this->displayField('postcode'); $this->primaryKey('postcode'); }