本文整理汇总了PHP中X2Model::relations方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::relations方法的具体用法?PHP X2Model::relations怎么用?PHP X2Model::relations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Model
的用法示例。
在下文中一共展示了X2Model::relations方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: relations
public function relations()
{
return array_merge(parent::relations(), array('list' => array(self::BELONGS_TO, 'X2List', array('listId' => 'nameId')), 'attachments' => array(self::HAS_MANY, 'CampaignAttachment', 'campaign')));
}
示例2: relations
/**
* @return array relational rules.
*/
public function relations()
{
return array_merge(parent::relations(), array('workflow' => array(self::BELONGS_TO, 'Workflow', 'workflowId'), 'workflowStage' => array(self::BELONGS_TO, 'WorkflowStage', 'stageNumber'), 'actionMetaData' => array(self::HAS_ONE, 'ActionMetaData', 'actionId'), 'actionText' => array(self::HAS_ONE, 'ActionText', 'actionId')));
}
示例3: relations
/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array_merge(parent::relations(), array('products' => array(self::HAS_MANY, 'QuoteProduct', 'quoteId', 'order' => 'lineNumber ASC'), 'contact' => array(self::BELONGS_TO, 'Contacts', array('associatedContacts' => 'nameId'))));
}
示例4: relations
/**
* @return array relational rules.
*/
public function relations()
{
return array_merge(parent::relations(), array('order' => array(self::HAS_MANY, 'QuoteProduct', 'productId')));
}
示例5: relations
/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array_merge(parent::relations(), array());
}