/** * Gets the constrained items * * @param closure $constraint The constraint function to apply * @return \Hubzero\Database\Rows * @since 2.0.0 **/ protected function getConstrained($constraint) { call_user_func_array($constraint, array($this->related)); // Note that rows is called on the base relational model, not on this relationship, // thus it is not calling the constrain method...which is how we want it to work. // Constraining here would not make sense as that would limit our result to 1 entry. return $this->related->rows(); }