public static function relationType($type) { if (in_array($type, Relation::relations())) { return true; } throw new LazerException('Wrong relation type'); }
/** * Set relation type to field * @param string $relation Name of relation */ protected function setRelationType($relation) { Validate::relationType($relation); $this->relationType = $relation; }