Adds a word element.

@param string $role
@param string $text

@return ContainerElement
768904
public function word(string $role, string $text): ContainerElement
    {
        /** @var ContainerElement $this */
        return $this->addElement(Word::factory($role, $text));
    }
362789
protected function updateRole($role, $description = '', $ruleName = null, $data = null)
    {
        if (is_string($role)) {
            $role = $this->findRole($role);
        }

        echo "    > update role $role->name ...";
        $time = microtime(true);

        $role->description = $description;
        $role->ruleName    = $ruleName;
        $role->data        = $data;

        $this->authManager->update($role->name, $role);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";

        return $role;
    }
938540
public function addOption(string $value, string $text) : FormElement
    {
        $this->options[$value] = $text;
        return $this;
    }
905584
public void addRole(Role role) {
        apiRoles.add(role);
        roles.add(role.getName());
        for (org.seedstack.seed.security.Permission permission : role.getPermissions()) {
            if (!role.getScopes().isEmpty()) {
                for (Scope scope : role.getScopes()) {
                    ScopePermission sp = new ScopePermission(permission.getPermission(), scope);
                    scopePermissions.add(sp);
                }
            } else {
                stringPermissions.add(permission.getPermission());
            }
        }
    }
1123857
public function addDatabaseReaderRole($role)
	{
		if (strlen($role) < 1) {
			throw new InvalidArgumentException("Role can't be empty");
		}
		$sec = $this->getSecurity();
		if (in_array($role, $sec->readers->roles)) {
			return true;
		}
		array_push($sec->readers->roles, $role);
		$back = $this->setSecurity($sec);
		if (is_object($back) && property_exists($back, "ok") && $back->ok == true) {
			return true;
		}
		return false;
	}
1307253
private function createElement($type, $children = array(), array $attributes = array(), $text = null)
    {
        $element = new NodeElement();
        $element->openTag($type);

        if (!empty($attributes)) {
            $element->addAttributes($attributes);
        }

        if (!empty($children)) {
            if ($children instanceof NodeElement) {
                $children = array($children);
            }

            $element->appendChildren($children);
        }

        if ($text !== null) {
            $element->setText($text);
        }

        $element->closeTag();

        return $element;
    }
512514
public static function factory(string $role, string $text): Word
    {
        $instance = new static();
        $instance->role = $role;
        $instance->text = $text;

        return $instance;
    }
134461
public function addRole($username, $role)
    {
        $user = $this->findUserByUsernameOrThrowException($username);
        if ($user->hasRole($role)) {
            return false;
        }

        $user->addRole($role);
        $this->userManager->updateUser($user);

        return true;
    }
957350
public function addRoles(Collection $roles)
    {
        foreach($roles as $role){
            $this->roles->add($role);
        }
        
    }
67131
public function attachRole($role)
    {
        if (! $this->hasRole($role->name)) {
            $this->roles()->attach($role);
        }
    }
1118984
public function addRole($role)
    {
        if ($this->instance instanceof \Phavour\Session\Storage) {
            if ($this->hasRole($role)) {
                return true;
            }
            if ($this->instance->isLocked()) {
                $this->instance->unlock();
            }
            $roles = $this->instance->get('roles');
            if (is_array($roles)) {
                $this->instance->set(
                    'roles', array_merge($roles, array($role)));
            } else {
                $this->instance->set('roles', array($role));
            }
            $this->instance->lock();
            return true;
        }

        return false;
    }
419674
@Override
    public void addRole(final String role) {
        CommonHelper.assertNotBlank("role", role);
        this.roles.add(role);
    }
1289678
public function addRole($role, array $resources = [])
    {
        if ($role instanceof RoleInterface) {
            $this->roles[$role->getName()] = $role;
        } else {
            $role = new Role($role, $resources);
            $this->roles[$role->getName()] = $role;
        }
    }
170944
public function addText(Project $project, $element, $text)
    {
        if ($this->methodAddText === null) {
            $msg = $this->getElementName($project, $element) . " doesn't support nested text data.";
            throw new BuildException($msg);
        }
        try {
            $method = $this->methodAddText;
            $method->invoke($element, $text);
        } catch (Exception $exc) {
            throw new BuildException($exc->getMessage(), $exc);
        }
    }
1274637
public function removeRole(\WobbleCode\UserBundle\Document\Role $role)
    {
        $this->roles->removeElement($role);
    }
1206273
public function add($role)
    {
        $this->bucket[$role] = sprintf("%05d", $this->acl->getRoleLevel($role)) .'-'. $role;
        return $this;
    }
1221673
public function addRole($role)
    {
        if (!$this->hasRole($role)) {
            $this->roles[] = strtoupper($role);
        }

        return $this;
    }