Type::relations PHP Method

relations() public method

public relations ( ) : array
return array
    public function relations()
    {
        return ['attributeRelation' => [self::HAS_MANY, 'TypeAttribute', 'type_id'], 'typeAttributes' => [self::HAS_MANY, 'Attribute', ['attribute_id' => 'id'], 'through' => 'attributeRelation', 'with' => 'group', 'order' => 'group.position ASC'], 'productCount' => [self::STAT, 'Product', 'type_id'], 'products' => [self::HAS_MANY, 'Product', 'type_id']];
    }