public function model_call_is_descendant_of(Jam_Model $model, Jam_Event_Data $data, $ansestor) { $ansestor_id = $ansestor instanceof Jam_Model ? $ansestor->id() : $ansestor; $data->return = $model->ansestors()->where(':primary_key', '=', $ansestor_id)->count_all() > 0; }