Model/User.php
public function setFunctionalities(array $functionalities)
    {
        $this->functionalities = [];

        foreach ($functionalities as $item) {
            $this->addFunctionality($item);
        }

        return $this;
    }
public function setFunctionalities(array $functionalities)
    {
        $this->functionalities = [];

        foreach ($functionalities as $item) {
            $this->addFunctionality($item);
        }

        return $this;
    }
Sets the "functionalities" of the User.

@param Functionality[] $functionalities

@return User