NewNoteForm::execute PHP Method

execute() public method

public execute ( $request )
    function execute($request)
    {
        $user = $request->getUser();
        $noteDao = DAORegistry::getDAO('NoteDAO');
        $note = $noteDao->newDataObject();
        $note->setUserId($user->getId());
        $note->setContents($this->getData('newNote'));
        $note->setAssocType($this->getAssocType());
        $note->setAssocId($this->getAssocId());
        return $noteDao->insertObject($note);
    }