Object::extraRelationships PHP 메소드

extraRelationships() 공개 정적인 메소드

Define Relationships so that its child class can call it
public static extraRelationships ( ) : type
리턴 type
    public static function extraRelationships()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array('author' => array(self::BELONGS_TO, 'User', 'object_author'), 'language' => array(self::BELONGS_TO, 'Language', 'lang'));
    }

Usage Example

예제 #1
0
 /**
  * @return array relational rules.
  */
 public function relations()
 {
     return CMap::mergeArray(array(), Object::extraRelationships());
 }