Created
August 1, 2011 15:04
-
-
Save dennisoehme/1118297 to your computer and use it in GitHub Desktop.
SitemapHandling
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 characters
| <?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(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment