本文整理匯總了PHP中Cake\ORM\Table::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Table::initialize方法的具體用法?PHP Table::initialize怎麽用?PHP Table::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cake\ORM\Table
的用法示例。
在下文中一共展示了Table::initialize方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
/**
* 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');
}
示例2: initialize
/**
* @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);
}
示例3: initialize
/**
* 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']);
}
示例4: initialize
public function initialize(array $config)
{
parent::initialize($config);
$this->table('event_guests');
$this->belongsTo('Phonebooks');
$this->belongsTo('Events');
}
示例5: initialize
/**
* 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']);
}
示例6: initialize
/**
* @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);
}
示例7: initialize
/**
* @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);
}
示例8: initialize
/**
* 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']);
}
示例9: initialize
/**
* @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);
}
示例10: initialize
public function initialize(array $config)
{
parent::initialize($config);
$this->displayField('title');
$this->belongsTo('Books');
$this->hasMany('Distributions');
}