public function havePositions(array $req_positions)
    {
        $positions = new ArrayCollection();

        foreach ($req_positions as $position) {
            if ($position = trim($position) === '') {
                continue;
            }
            if ($positions->contains($position)) {
                continue;
            }

            $positions->add($position);
        }

        if (!$positions->isEmpty()) {
            $this->positions = $positions;
        }

        return $this;
    }
public function havePositions(array $req_positions)
    {
        $positions = new ArrayCollection();

        foreach ($req_positions as $position) {
            if ($position = trim($position) === '') {
                continue;
            }
            if ($positions->contains($position)) {
                continue;
            }

            $positions->add($position);
        }

        if (!$positions->isEmpty()) {
            $this->positions = $positions;
        }

        return $this;
    }
public function havePositions ( array $ req_positions ) { $ positions = new ArrayCollection ( ) ; foreach ( $ req_positions as $ position ) { if ( $ position = trim ( $ position ) === '' ) { continue ; } if ( $ positions -> contains ( $ position ) ) { continue ; } $ positions -> add ( $ position ) ; } if ( ! $ positions -> isEmpty ( ) ) { $ this -> positions = $ positions ; } return $ this ; }
Restrict users with provided jobs

@param array $req_positions

@return $this
Restrict users with provided jobs