Controller/XingHandler.php
public function processContent(Operation $operation, $data)
    {
        try {
            if(is_array($data)) {
                $message = $this->contentService->getMessageByOperation($operation);
                $message->setMessage($data['message']);
            } else {
                $message = $data;            
            }
        } catch (\Exception $e){
            // message has not been created yet, so do it from the form data.
            $message = $data;
        }
        return $message;
    }
public function processContent(Operation $operation, $data)
    {
        try {
            if(is_array($data)) {
                $message = $this->contentService->getMessageByOperation($operation);
                $message->setMessage($data['message']);
            } else {
                $message = $data;            
            }
        } catch (\Exception $e){
            // message has not been created yet, so do it from the form data.
            $message = $data;
        }
        return $message;
    }
public function processContent ( Operation $ operation , $ data ) { try { if ( is_array ( $ data ) ) { $ message = $ this -> contentService -> getMessageByOperation ( $ operation ) ; $ message -> setMessage ( $ data [ 'message' ] ) ; } else { $ message = $ data ; } } catch ( \ Exception $ e ) { // message has not been created yet, so do it from the form data. $ message = $ data ; } return $ message ; }
Create or modify the Content object from the form data.

Called in these views:
- new
- editApi

@param Operation $operation
@param $data Form submit data of the Content.
@return mixed
Create or modify the Content object from the form data .