public static function make($name, $visibility) { $group = new ProfilePropertyGroup(); $group->setGroupName($name); $group->setVisibility($visibility); return $group; }
private function addPropertyToGroup(ObjectManager $manager, ProfilePropertyGroup $group, ProfileProperty $property) { /** @var ProfileProperty $gprop */ foreach ($group->getProperties() as $gprop) { if ($gprop->getName() == $property->getName()) { return; } } $group->addProperty($property); }