Esempio n. 1
0
 private function createFilename(NodeReferenceInterface $proxy)
 {
     return preg_replace('/[^a-z\\.-]+/', '-', $proxy->getNode()->getTitle() . '.conf');
 }
Esempio n. 2
0
 /**
  * @param NodeReferenceInterface $record
  * @param Request                $request
  *
  * @return Response
  */
 private function renderTemplate(NodeReferenceInterface $record, Request $request)
 {
     $event = new FrontNodeEvent($record->getNode(), 'ClasticFrontBundle:Node:detail.html.twig', array('record' => $record), $request);
     $this->get('event_dispatcher')->dispatch('clastic.node.front', $event);
     return $this->render($event->getTemplate(), $event->getTemplateArguments());
 }