<user-additions part="otherMethods">
332418
public function getCascadeOwnerPart(PHPAttribute $attribute)
    {
        $cascadeAttributes = [];

        if (in_array($attribute->getCascadePersist(), ['both', 'owner'])) {
            $cascadeAttributes[] = '"persist"';
        }

        if (in_array($attribute->getCascadeRemove(), ['both', 'owner'])) {
            $cascadeAttributes[] = '"remove"';
        }

        if (count($cascadeAttributes) > 0) {
            return ', cascade={' . implode(', ', $cascadeAttributes) . '}';
        } else {
            return '';
        }
    }
81151
function addUser(user) {
	var slElement = $(document.createElement("option"));
	slElement.attr("value", user);
	slElement.text(user);
	$("#usersList").append(slElement);
}
1005611
public void addListeners()
    {
        this.getRecord(UserInfo.USER_INFO_FILE).getField(UserInfo.USER_NAME).setEnabled(false);
        this.readCurrentUser();
        
        super.addListeners();
        
        this.getMainRecord().addListener(new UserPasswordHandler(true));
    }
85049
@Override
	public void addSuggestions(String term, List<Alternative> suggestions) {
		this.suggestions.put(term, suggestions);
	}
914246
public MethodInfo addMethod(Modifiers modifiers,
                                String methodName,
                                TypeDesc ret,
                                TypeDesc... params) {
        return addMethod(modifiers, methodName, null, ret, params);
    }
1342284
public void addAndOverwriteProperties(Map<String, String> additionalProperties) {
        additionalProperties.values().removeAll(Collections.singleton(null));
        for (Map.Entry<String, String> additionalPropertiesMap : additionalProperties.entrySet()) {
            if (!additionalPropertiesMap.getValue().trim().isEmpty()) {
                properties.setProperty(additionalPropertiesMap.getKey(), additionalPropertiesMap.getValue());
                warnUserOfPossibleErrors(additionalPropertiesMap.getKey(), properties);
            }
        }
    }
709966
public void addListeners()
    {
        super.addListeners();
        
        Record recUserInfo = this.getMainRecord();
        recUserInfo.setKeyArea(UserInfo.USER_NAME_KEY);
        
        if (m_recHeader != null)
            ((ReferenceField)this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID)).setReference(m_recHeader);
        
        recUserInfo.addListener(new ExtractRangeFilter(UserInfo.USER_NAME, this.getScreenRecord().getField(UserScreenRecord.NAME_SORT)));
        recUserInfo.addListener(new CompareFileFilter(recUserInfo.getField(UserInfo.USER_GROUP_ID), this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID), "=", null, true));
        
        this.getScreenRecord().getField(UserScreenRecord.NAME_SORT).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord(). addListener(new SetupNewUserHandler(null));
    }
317696
public function add()
    {
        $this->loadModel('User.Users');
        $user = $this->Users->newEntity();
        $user = $this->Users->attachFields($user);
        $languages = LocaleToolbox::languagesList();
        $roles = $this->Users->Roles->find('list', [
            'conditions' => [
                'id NOT IN' => [ROLE_ID_AUTHENTICATED, ROLE_ID_ANONYMOUS]
            ]
        ]);

        if ($this->request->data()) {
            $user->accessible('id', false);
            $data = $this->request->data;

            if (isset($data['welcome_message'])) {
                $sendWelcomeMessage = (bool)$data['welcome_message'];
                unset($data['welcome_message']);
            } else {
                $sendWelcomeMessage = false;
            }

            $user = $this->Users->patchEntity($user, $data);
            if ($this->Users->save($user)) {
                if ($sendWelcomeMessage) {
                    NotificationManager::welcome($user)->send();
                }

                $this->Flash->success(__d('user', 'User successfully registered!'));
                $this->redirect(['plugin' => 'User', 'controller' => 'manage', 'action' => 'edit', $user->id]);
            } else {
                $this->Flash->danger(__d('user', 'User could not be registered, please check your information.'));
            }
        }

        $this->title(__d('user', 'Register New User'));
        $this->set(compact('user', 'roles', 'languages'));
        $this->Breadcrumb->push('/admin/user/manage');
    }
1118159
function(object, methods, property) {

        for (var i = 0, ii = methods.length; i < ii; ++i) {
            this.addMethodToObject(methods[i], object, property);
        }
    }
258525
private void updateMethodParameters(final Set<MethodParameter> parameters, final Set<MethodParameter> additional) {
        additional.forEach(a -> {
            // remove preexisting parameters with identical names
            final Optional<MethodParameter> existingParameter = parameters.stream().filter(p -> p.getName().equals(a.getName())).findAny();
            existingParameter.ifPresent(parameters::remove);
            parameters.add(a);
        });
    }
378025
def add_methods(self, names, methods):
        
        if isinstance(names, string_types):
            names = [names]
            methods = [methods]
        for name,method in zip(names, methods):
            setattr(self, name, types.MethodType(method, self))
659899
public function addMentionsFromBody()
    {
        $entity = $this->getItem();
        $usernames = $this->extractMentions($entity->body);

        foreach ($usernames as $username) {
            $entity->addMention(trim($username));
        }

        $this->_newly_mentioned = $usernames;
    }
801170
function() {
            var newMethods = $._.$.iot.extraCAMethods();
            $._.$.log && $._.$.log.debug('Adding CA methods:' +
                                         JSON.stringify(Object
                                                        .keys(newMethods)));
            myUtils.mixin($.handler, newMethods, true);
        }
1073936
public void setUserDefinedFunctions(java.util.Collection<UserDefinedFunction> userDefinedFunctions) {
        if (userDefinedFunctions == null) {
            this.userDefinedFunctions = null;
            return;
        }

        this.userDefinedFunctions = new java.util.ArrayList<UserDefinedFunction>(userDefinedFunctions);
    }
653995
public static void addGeneratedMethod(ClassNode cNode, MethodNode mNode) {
        cNode.addMethod(mNode);
        markAsGenerated(cNode, mNode);
    }
870619
def Add(self, other):
    """"""
    new_descriptors = []
    for desc in self.descriptors + other.descriptors:
      if desc not in new_descriptors:
        new_descriptors.append(desc)

    return TypeDescriptorSet(*new_descriptors)
66502
function appendMethods(list, addition) {
  for (var i = 0; i < addition.length; i++) {
    var method = addition[i];
    if (list.indexOf(method) === -1) {
      list.push(method);
    }
  }
}