Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/uikit/view/toolbar/parameters.php
<?php

class AnUikitViewToolbarParameters extends KToolbarButtonAbstract
{
	/**
	 * component 
	 * 
	 * @var string
	 * */
	protected $_component;
	
	/**
	 * size of the modal to open 
	 *
	 * @var array
	 * */
	protected $_modal_size;
	
	/**
	 * link to the component configuration
	 * 
	 * @var string
	 */
	protected $_link;
	
	/**
	 * 
	 * @return 
	 * @param $options Object
	 */
	public function __construct($options)
	{	
		$default = array(
			'width'  => 500 ,
			'height' => 500			
		);
		
		$options 			 = array_merge($default, $options);
		
		$this->_component 	 = $options['component'];	
		
		$this->_modal_size   = array('x'=>$options['width'],'y'=>$options['height']);
		 
		parent::__construct($options);

		$this->_options['icon'] = 'icon-32-config';	
		
		KTemplate::loadHelper('script', KRequest::root().'/media/system/js/modal.js');
		KTemplate::loadHelper('stylesheet',    KRequest::root().'/media/system/css/modal.css');
		
		$this->_link = "index.php?option=com_config&controller=component&component={$this->_component}";
	}
	
	public function getOnClick()
	{
		$options = '{handler:\'iframe\',size:{x:'.$this->_modal_size['x'].',y:'.$this->_modal_size['y'].'}}';
		return "SqueezeBox.initialize({});SqueezeBox.fromElement(this,$options);return false;";	
	}
	
	/**
	 * 
	 * @return 
	 */
	public function getLink()
	{
		return $this->_link;
	}
	
}
Return current item: Anahita Social Engine