2amigos / yii2-editable-widget

X-Editable Widget for Yii2
Other
58 stars 20 forks source link

Allow Editable to access relational fields #2

Closed sycdan closed 10 years ago

sycdan commented 10 years ago

Rather than directly accessing the model's attribute (via $this->model->{$this->attribute}), Editable will now follow the relation chain of the model, using dot format (model.relation.attribute). Also, $this->value will now take precedence over $this->attribute, as in DataColumn::renderDataCellContent. In the case of a relational attribute, the dots will also be escaped to allow jQuery to find the element.

tonydspaniard commented 10 years ago

@sycdan Thanks!