Item::relations PHP Méthode

relations() public méthode

public relations ( ) : array
Résultat 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('category' => array(self::BELONGS_TO, 'Category', 'category_id'), 'image' => array(self::HAS_MANY, 'ItemImg', 'item_id'), 'type' => array(self::BELONGS_TO, 'ItemType', 'type_id'));
    }