public function preExecute() { if ($this->getRoute() instanceof sfDoctrineRoute) { $object = $this->getRoute()->getObject(); if ($object instanceof Community) { $this->community = $object; $this->acl = opCommunityWikiAclBuilder::buildCollection($this->community, array($this->getUser()->getMember())); } elseif ($object instanceof CommunityWiki) { $this->communityWiki = $object; $this->community = $this->communityWiki->getCommunity(); $this->acl = opCommunityWikiAclBuilder::buildResource($this->communityWiki, array($this->getUser()->getMember())); } } }
<script type="text/javascript"> SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.defaults['gutter'] = false; SyntaxHighlighter.defaults['class-name'] = 'class_community_wiki'; SyntaxHighlighter.all(); </script> <style> .class_community_wiki { border: 2px solid #eee; } .class_community_wiki table{ margin: 2px !important; } .syntaxhighlighter .gutter .line { border-right: 2px solid #ACF !important; } </style> <?php use_helper('Date'); $acl = opCommunityWikiAclBuilder::buildCollection($community, array($sf_user->getMember())); ?> <div class="dparts wikiDetailBox"> <div class="parts"> <div class="partsHeading"> <h3><?php echo '[' . $community->getName() . '] ' . __('Wiki'); ?> </h3> </div> <dl> <dt><?php echo nl2br(op_format_date($communityWiki->getCreatedAt(), 'XDateTimeJaBr')); ?>