(non-PHPdoc)

@see \oat\tao\model\media\MediaManagement::add
504949
public function add($source, $fileName, $parent, $mimetype = null)
    {
        if (!file_exists($source)) {
            throw new \tao_models_classes_FileNotFoundException($source);
        }
        
        $clazz = $this->getOrCreatePath($parent);
        
        $service = $this->getMediaService();
        $instanceUri = $service->createMediaInstance($source, $clazz->getUri(), $this->getLang(), $fileName, $mimetype);

        return $this->getFileInfo($instanceUri);
    }
581641
public function addMention($username)
    {
        if (
            $mentioned = $this->getService('repos:people.person')->find(array('username' => $username))
        ) {
            $this->mentions->insert($mentioned);

            if ($this->_mixer->isSubscribable() && !$this->_mixer->subscribed($mentioned)) {
                $this->_mixer->addSubscriber($mentioned);
            }

            return $this;
        } else {
            $this->invalidateUsername($username);

            return;
        }
    }
1254753
public function add()
    {
        $args = func_get_args();

        if (count($args) == 1) {
            list($middleware) = $args;
            if (!is_null($this->currentGroup)) {
                //middlewares no group
                $this->groupMiddlewares[$this->currentGroup][] = $middleware;
            } else {
                //middlewares na rota
                $lastRoute = $this->findLastRoute();
                $lastRoute->addMiddleware($middleware);
            }

        } elseif(count($args) > 1) {
            list($routeNames, $middlewares) = $args;
            foreach ($routeNames as $routeName) {
                if (isset($this->middlewares[$routeName])) {
                    $currentMiddlewares = $this->middlewares[$routeName];
                    $this->middlewares[$routeName] = array_merge($middlewares, $currentMiddlewares);
                } else {
                    $this->middlewares[$routeName] = $middlewares;
                }
            }
        }
        return $this;
    }
1286880
public function addMedia(\Amulen\MediaBundle\Entity\Media $medias)
    {
        $this->medias[] = $medias;

        return $this;
    }
1069123
public function add()
	{
		// Get the hook we're setting
		$trigger = $this->arguments->getOpt(3);
		$hook    = $this->arguments->getOpt(4);

		// Delete the primary args so they aren't added as top level config values
		$this->arguments->deleteOpt(3);
		$this->arguments->deleteOpt(4);

		// Set the new hooks argument
		$this->arguments->setOpt('hooks', array($trigger => array($hook)));

		// Redirect back to the basic configuration set method
		App::get('client')->call('configuration', 'set', $this->arguments, $this->output);
	}
971925
public function add($items)
        {
            if ($items && $items instanceof Container) {
                $id = (int) $items->id;
                $this->_items[$id] = $items;
            } elseif (Arrays::is($items)) {
                foreach ($items as $obj) {
                    if ($obj instanceof Container) {
                        $this->add($obj);
                    }
                }
            } elseif ($items instanceof self) {
                $this->add($items->toArray());
            }

            return $this;
        }
546040
public function add($e)
    {
        $this->exceptions[] = $e;
        if ($this->message) {
            $this->message .= "\n";
        }

        $this->message .= $this->getExceptionMessage($e, 0);

        return $this;
    }
822165
public function add($data) {
        if (!array_search($data, $this->_datas, true) && is_object($data)) {
            $data = clone $data;
        }

        if (is_array($data)) {
            $this->_datas = array_merge($this->_datas, $data);
        }
        else {
            if (get_class($data) != 'Gcs\Framework\Core\Collection\Collection') {
                array_push($this->_datas, $data);
            }
            else {
                array_merge($this->_datas, $data->data());
            }
        }
    }
663758
public function add()
    {
        $this->loadModel('Content.ContentTypes');
        $this->loadModel('User.Roles');
        $type = $this->ContentTypes->newEntity();

        if ($this->request->data()) {
            $type = $this->ContentTypes->patchEntity($type, $this->request->data());
            $errors = $type->errors();
            $success = empty($errors);

            if ($success) {
                $success = $this->ContentTypes->save($type);
                if ($success) {
                    $this->Flash->success(__d('content', 'Content type created, now attach some fields.'));
                    $this->redirect(['plugin' => 'Content', 'controller' => 'fields', 'type' => $type->slug]);
                }
            }

            if (!$success) {
                $this->Flash->danger(__d('content', 'Content type could not be created, check your information.'));
            }
        }

        $roles = $this->Roles->find('list');
        $this->title(__d('content', 'Define New Content Type'));
        $this->set(compact('type', 'roles'));
        $this->set('languages', LocaleToolbox::languagesList());
        $this->Breadcrumb
            ->push('/admin/content/manage')
            ->push(__d('content', 'Content Types'), '/admin/content/types')
            ->push(__d('content', 'Creating Content Type'), '#');
    }
105562
public function add()
    {
        $this->defaultData();
        $container = new tao_actions_form_Users($this->getClass(TaoOntology::CLASS_URI_TAO_USER));
        $form = $container->getForm();

        if ($form->isSubmited()) {
            if ($form->isValid()) {
                $values = $form->getValues();
                $values[GenerisRdf::PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($values['password1']);
                $plainPassword = $values['password1'];
                unset($values['password1']);
                unset($values['password2']);

                $user = $container->getUser();
                $binder = new tao_models_classes_dataBinding_GenerisFormDataBinder($container->getUser());

                if ($binder->bind($values)) {
                    $this->getEventManager()->trigger(new UserUpdatedEvent(
                            $user,
                            array_merge($values, ['hashForKey' => UserHashForEncryption::hash($plainPassword)]))
                    );
                    $this->setData('message', __('User added'));
                    $this->setData('exit', true);
                }
            }
        }

        $this->setData('loginUri', tao_helpers_Uri::encode(GenerisRdf::PROPERTY_USER_LOGIN));
        $this->setData('formTitle', __('Add a user'));
        $this->setData('myForm', $form->render());
        $this->setView('user/form.tpl');
    }
197658
public function add($a, $b)
    {
        return bcadd($this->bcNormalize($a), $this->bcNormalize($b));
    }
1188117
public static function add(/** polymorphic **/)
    {
       $args = func_get_args();
       $that = self::get_this($args);
       $term = self::get_term($args);

       $url = URIResource::Make($that->path, array($that->id, $term));

       $id = Locator::Find($that->client->post($url, $args->get()));
        
       return $this->$term($id);
    }
566252
public function add()
    {
        if ($this->request->is('post')) {
            
            $userGroupPermission = $this->UserGroupPermission->findUserGroupPermission(
                    ['id'], 
                    $this->request->data['group_or_user_id'], 
                    $this->request->data['group_or_user'], 
                    $this->request->data['permission_id']
                )->first();
            
            if(!is_null($userGroupPermission)) {
                $this->UserGroupPermission->get($userGroupPermission->id);
                $userGroupPermission->allow = $this->request->data['allow'];
            }else {
                $userGroupPermission = $this->UserGroupPermission->patchEntity($userGroupPermission, $this->request->data);
            }

            if ($this->UserGroupPermission->save($userGroupPermission)) {
                $this->Flash->success(__('The user group permission has been saved.'));
            } else {
                $this->Flash->error(__('The user group permission could not be saved. Please, try again.'));
            }
        }
        return $this->redirect(['action' => 'index']);
    }
159192
public function addOwners()
    {
        foreach ($this->attributes as $attr) {
            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }
758728
public function add($x = 0, $y = 0) {
		$this->width += $x;
		$this->height += $y;
		return $this;
	}
96406
public function add($data = null) {
		if (is_array($data)) {
			foreach ($data as $elem) {
				$this->add($elem);
			}
		} else {
			$guid = $this->toGUID($data);
			if ($guid) {
				array_push($this->guids, $guid);
				sort($this->guids);
			}
		}
		return $this;
	}
803078
public function add()
    {
        $translation = $this->Translations->newEntity();
        if ($this->request->is('post')) {
            $data = is_array($this->request->getData()) ? $this->request->getData() : [];
            $translation = $this->Translations->patchEntity($translation, $data);
            $result = $this->Translations->save($translation);
            if ($result) {
                $this->Flash->success((string)__('The translation has been saved.'));

                return $this->redirect(['action' => 'index']);
            }
            $this->Flash->error((string)__('The translation could not be saved. Please, try again.'));
        }
        $languages = $this->Translations->Languages->find('all', ['limit' => 200]);
        $this->set(compact('translation', 'languages'));
        $this->set('_serialize', ['translation']);
    }