/**
  * Deletes a SocialNetwork entity.
  *
  * @Route("/{id}/delete", name="admin_socialnetwork_delete", requirements={"id"="\d+"})
  * @Method("DELETE")
  */
 public function deleteAction(SocialNetwork $socialnetwork, Request $request)
 {
     $form = $this->createDeleteForm($socialnetwork->getId(), 'admin_socialnetwork_delete');
     if ($form->handleRequest($request)->isValid()) {
         $em = $this->getDoctrine()->getManager();
         $em->remove($socialnetwork);
         $em->flush();
     }
     return $this->redirect($this->generateUrl('admin_socialnetwork'));
 }
 public function setupConfig(SocialNetwork $socialNetwork)
 {
     if (is_null($this->config)) {
         $this->config = array('app_id' => $socialNetwork->getClientId(), 'app_secret' => $socialNetwork->getClientSecret());
     }
 }
 public function setupConfig(SocialNetwork $socialNetwork)
 {
     if (is_null($this->config)) {
         $this->config = array('app_id' => $socialNetwork->getClientId(), 'app_secret' => $socialNetwork->getClientSecret(), 'default_graph_version' => 'v2.6', 'persistent_data_handler' => 'session');
     }
 }