src/Entity/Group.php
/**
     * This method add the user passed as argument to the admins of the group. If the user is not in the group, the method add him.
     */
This method add the user passed as argument to the admins of the group. If the user is not in the group, the method add him.
This method add the user passed as argument to the admins of the group . If the user is not in the group the method add him .
public function addAdmin(User $user): self
    {
        if (!$this->members->contains($user)) {
            $this->members[] = $user;
        }
        if (!$this->admins->contains($user)) {
            $this->admins[] = $user;
        }
        return $this;
    }
public function addAdmin ( User $ user ) : self { if ( ! $ this -> members -> contains ( $ user ) ) { $ this -> members [ ] = $ user ; } if ( ! $ this -> admins -> contains ( $ user ) ) { $ this -> admins [ ] = $ user ; } return $ this ; }
This method add the user passed as argument to the admins of the group.
This method add the user passed as argument to the admins of the group .