public function append(Model $model)
    {
        $result = null;
        // If the list was filtered make sure that value is set on the model.
        if ($this->filter !== null) {
            $result = $this->filter->setFilterValuesOnModel($model);
        }
        $model->save();

        // Make sure the list is refetched.
        $this->invalidate();

        return ($result === null) ? $model : $result;
    }
public function append(Model $model)
    {
        $result = null;
        // If the list was filtered make sure that value is set on the model.
        if ($this->filter !== null) {
            $result = $this->filter->setFilterValuesOnModel($model);
        }
        $model->save();

        // Make sure the list is refetched.
        $this->invalidate();

        return ($result === null) ? $model : $result;
    }
public function append ( Model $ model ) { $ result = null ; // If the list was filtered make sure that value is set on the model. if ( $ this -> filter !== null ) { $ result = $ this -> filter -> setFilterValuesOnModel ( $ model ) ; } $ model -> save ( ) ; // Make sure the list is refetched. $ this -> invalidate ( ) ; return ( $ result === null ) ? $ model : $ result ; }
Append a model to the list and correctly set any fields required to make this re-fetchable through the same list.

@param  \Rhubarb\Stem\Models\Model $model
@return \Rhubarb\Stem\Models\Model|null
Append a model to the list and correctly set any fields required to make this re - fetchable through the same list .