public function savePost(DataObject $post, $data) {
		if ($post->checkPerm('Write') && isset($data['Content'])) {
			$post->Content = $data['Content'];
			if ($this->securityContext->getMember()->Balance >= MicroBlogMember::BALANCE_THRESHOLD) {
				$post->analyseContent();
				$post->write();
			} else {
				$this->queuedJobService->queueJob(new ProcessPostJob($post));
			}
			$html = $post->renderWith('PostContent');
			return $post;
		}
	}
public function savePost(DataObject $post, $data) {
		if ($post->checkPerm('Write') && isset($data['Content'])) {
			$post->Content = $data['Content'];
			if ($this->securityContext->getMember()->Balance >= MicroBlogMember::BALANCE_THRESHOLD) {
				$post->analyseContent();
				$post->write();
			} else {
				$this->queuedJobService->queueJob(new ProcessPostJob($post));
			}
			$html = $post->renderWith('PostContent');
			return $post;
		}
	}
public function savePost ( DataObject $ post , $ data ) { if ( $ post -> checkPerm ( 'Write' ) && isset ( $ data [ 'Content' ] ) ) { $ post -> Content = $ data [ 'Content' ] ; if ( $ this -> securityContext -> getMember ( ) -> Balance >= MicroBlogMember :: BALANCE_THRESHOLD ) { $ post -> analyseContent ( ) ; $ post -> write ( ) ; } else { $ this -> queuedJobService -> queueJob ( new ProcessPostJob ( $ post ) ) ; } $ html = $ post -> renderWith ( 'PostContent' ) ; return $ post ; } }
Save the post

@param DataObject $post
@param type $data
Save the post