Location: PHPKode > projects > Studis > plugins/sfAjaxTabsPlugin/lib/helper/TabsHelper.php
<?php
/**
 To generate automatically ajax tabs
 Displays the current style of a link.
@author: Markus Brugger
 */

function link_to_tab($text, $route, $style_options) {

	$style_options = _parse_attributes($style_options);

	// If class was not set, choose "active" by default
	if (!isset($style_options['id']))
	{
		// a href style
		$style_options['id'] = '1';
	}
	
	$controller = sfContext::getInstance();
	$current_module = $controller->getModuleName();
	$current_action = $controller->getActionName();

	// Get overhanded module and action
	$route_array = explode("/", $route);
	$module = $route_array[0];
	$action = $route_array[1];
		
	$return_string = '<li>'.link_to_remote($text, array(
	    'update' => 'tabcontent',
	    'loading'  => "Element.show('load')",
		'complete' => visual_effect('fade', 'load'),
	    'url'    => $route,
		'script' => true,
		'method'    => 'get'
		),		  	 
		array('id' => $style_options['id'])).'</li>' ;


	return $return_string; } ?>
Return current item: Studis