public function link($id, $additionalParams = array()) { if (!isset($id)) { $id = $this->getAction()->getRoute()->getObject()->getId(); } $structNode = LinkGen::getInstance(LinkGen::STRUCTURE)->linkParts($id); return url_for('structure_actions', array_merge(array('p0' => $structNode['p0']), array('action' => 'signIn', 'module' => 'publicUserRegistration'), $additionalParams)); }
public function linkParts($id, $additionalParams = array()) { if (!isset(self::$groupMap[$id])) { return false; } $nodeParts = LinkGen::getInstance(LinkGen::STRUCTURE)->linkParts(self::$groupMap[$id]['node']); $route = 'category_page_lvl_' . count($nodeParts); $groupParts = self::$groupMap[$id]['group']; return array_merge($nodeParts, $groupParts, array('route' => $route), $additionalParams); }
public function link($id, $additionalParams = array()) { if (!isset($additionalParams['link_to_struct'])) { throw new Exception('NewItem should be linked to structure element'); } else { $link_to_struct = $additionalParams['link_to_struct']; unset($additionalParams['link_to_struct']); } $structNode = LinkGen::getInstance(LinkGen::STRUCTURE)->linkParts($link_to_struct); return url_for('newsItem_page_lvl_' . (count($structNode) - 1), array_merge($additionalParams, $structNode), true); }
private function processForm($form) { $form->bind($this->getRequest()->getParameter($form->getName())); if ($form->isValid()) { $this->configuration->setFilters($form->getValues()); } else { $errSchema = $form->getErrorSchema(); foreach ($errSchema as $index => $err) { echo $index . ": " . $err . "\n"; } echo "not valid"; exit; } $this->getAction()->redirect(LinkGen::getInstance(LinkGen::STRUCTURE)->link($this->getRoute()->getObject()->getId())); }
<?php slot('article'); ?> <?php include_partial('productPreview/alphabet', array('chars' => $chars, 'node' => $node)); ?> <?php include_partial('productPreview/filters', array('form' => $form, 'node' => $node)); ?> <?php $links = LinkGen::getInstance(LinkGen::PRODUCT)->collectionLinks($products); ?> <table class="table-films"> <tbody> <?php $i = 0; ?> <?php foreach ($products as $index => $product) { ?> <?php $link = $links[$product['id']]; ?> <?php if (is_integer($i / 3)) { echo '<tr>'; } ?>
protected function getProductGroupLinkParts($id) { return LinkGen::getInstance(LinkGen::PRODUCT_GROUP)->linkParts($id); }
?> <?php } ?> <?php sort($chars); foreach ($chars as $char) { ?> <?php if (is_numeric($char['first_letter'])) { ?> <a class="<?php echo urldecode($sf_request->getParameter('alphabet_filter', '')) == $char['first_letter'] ? 'type02' : ''; ?> " href="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE)->link($node['id'], array('alphabet_filter' => $char['first_letter'])); ?> "><?php echo $char['first_letter']; ?> </a><?php } ?> <?php } ?> </div> </h1> <div class="block_bottom"></div> </div> <div class="boxarrow"></div>
?> <a class="add_linastus_link <?php echo $userLinastused && in_array($linastus['id'], $userLinastused) ? 'hidden' : ''; ?> " href="<?php echo $sf_user->isAuthenticated() ? LinkGen::getInstance(LinkGen::SCHEDULE)->link(null, array('action' => 'add', 'id' => $linastus['id'])) : '#'; ?> "><?php echo __('LISA OMA KAVVA'); ?> </a> <a class="remove_linastus_link <?php echo $userLinastused && in_array($linastus['id'], $userLinastused) ? '' : 'hidden'; ?> " href="<?php echo LinkGen::getInstance(LinkGen::SCHEDULE)->link(null, array('action' => 'delete', 'id' => $linastus['id'])); ?> "><?php echo __('EEMALDA'); ?> [X]</a><br> </span> <?php } ?> </div> <script type="text/javascript">
public function link($id, $additionalParams = array()) { $nodeID = $this->getAction()->getRoute()->getObject()->getId(); $nodeLink = LinkGen::getInstance(LinkGen::STRUCTURE)->linkParts($nodeID); return url_for('structure_actions', array_merge(array('id' => $id, 'p0' => $nodeLink['p0'], 'module' => 'schedule'), $additionalParams)); }