public function saveAnnotation()
    {
        if ($_SERVER["REQUEST_METHOD"] == "POST") {
            $this->checkTokenInUrl();

            $view = new View('@Annotations/saveAnnotation');

            // NOTE: permissions checked in API method
            // save the annotation
            $view->annotation = Request::processRequest("Annotations.save");

            return $view->render();
        }
    }
public function saveAnnotation()
    {
        if ($_SERVER["REQUEST_METHOD"] == "POST") {
            $this->checkTokenInUrl();

            $view = new View('@Annotations/saveAnnotation');

            // NOTE: permissions checked in API method
            // save the annotation
            $view->annotation = Request::processRequest("Annotations.save");

            return $view->render();
        }
    }
public function saveAnnotation ( ) { if ( $ _SERVER [ "REQUEST_METHOD" ] == "POST" ) { $ this -> checkTokenInUrl ( ) ; $ view = new View ( '@Annotations/saveAnnotation' ) ; // NOTE: permissions checked in API method // save the annotation $ view -> annotation = Request :: processRequest ( "Annotations.save" ) ; return $ view -> render ( ) ; } }
Controller action that modifies an annotation and returns HTML displaying
the modified annotation.

Query Param Input:
- idSite: The ID of the site the annotation belongs to. Only one ID is allowed.
- idNote: The ID of the annotation.
- date: The new date value for the annotation. (optional)
- note: The new text for the annotation. (optional)
- starred: Either 1 or 0. Whether the note should be starred or not. (optional)

Output:
- HTML displaying modified annotation.

If an optional query param is not supplied, that part of the annotation is
not modified.
Controller action that modifies an annotation and returns HTML displaying the modified annotation .