Created
August 1, 2011 15:04
-
-
Save dennisoehme/1118297 to your computer and use it in GitHub Desktop.
Revisions
-
dennisoehme created this gist
Aug 1, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ <?php class DetailsController extends Controller { public function overviewAction($id) { $contact = $this->_loadContact($id); $bookings = $this->_loadBookings($id); $this->getSitemap()->register($contact); //$this->getSitemap()->register($bookings); $contact->delete(); $values = array('customer' => $contact, 'bookings' => array()); if ($this->get('request')->query->has('ajax')) { return $this->render('AdticketElvisContactBundle::Details/_overview.html.twig', $values); } return $values; } } class Sitemap_Details_Overview extends Sitemap_Details_Abstract { public function configure() { $contact = $this->get('contact'); if ($contact->hasAttribute('vvk')) { $this->addTab('Vorverkaufsstelle', 'contact_details_vvk'); } if ($this->acl->isAllowed('edit', $contact)) { $this->add('action', array('label' => 'Kontakt editieren', 'show'=> $this->isDeleteable())); } } public function __call($name, $attr) { $type= "Tab"; $type = $this->container->get('goc_menu.type'.$type, $attr); } public function add($typeName, $attr) { } public function isDeleteable() { $this->container->get('contact_acl')->isDeletable(); } }