예제 #1
0
 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));
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
 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()));
 }
예제 #5
0
파일: _render.php 프로젝트: vcgato29/poff
<?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>';
    }
    ?>
예제 #6
0
 protected function getProductGroupLinkParts($id)
 {
     return LinkGen::getInstance(LinkGen::PRODUCT_GROUP)->linkParts($id);
 }
예제 #7
0
파일: _alphabet.php 프로젝트: vcgato29/poff
    ?>
	<?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>
예제 #8
0
        ?>
		<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">
예제 #9
0
 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));
 }