Skip to content

Instantly share code, notes, and snippets.

@fnordo
Created June 7, 2013 10:41
Show Gist options
  • Save fnordo/5728480 to your computer and use it in GitHub Desktop.
Save fnordo/5728480 to your computer and use it in GitHub Desktop.
timeline-activity-example
// ControllerAction
public function createControlsTheWorlddActivityAction($id)
{
$subject = $this->actionManager->findOrCreateComponent('Acme\Entity\Page', $id);
$action = $this->actionManager->create($subject, 'controls', array('directComplement' => 'the world'));
$this->actionManager->updateAction($action);
$activities = $this->actionManager->getSubjectActions($subject);
return new JsonResponse($activities, 202);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment