Spade

Mini Shell

Directory:~$ /home/lmsyaran/www/administrator/components/com_phocacart/models/fields/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/www/administrator/components/com_phocacart/models/fields/phocaattributes.php

<?php
/* @package Joomla
 * @copyright Copyright (C) Open Source Matters. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * @extension Phoca Extension
 * @copyright Copyright (C) Jan Pavelka www.phoca.cz
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */
defined('_JEXEC') or die();

class JFormFieldPhocaAttributes extends JFormField
{
	protected $type 		= 'PhocaAttributes';

	protected function getInput() {
		
		$id = (int) $this->form->getValue('id');

		$activeAttributes = array();
		if ((int)$id > 0) {
			$activeAttributes	= PhocacartAttribute::getAttributesById($id, 1);
		}
			
		return
PhocacartAttribute::getAllAttributesSelectBox($this->name.'[]',
$this->id, $activeAttributes, NULL,'id' );
	}
}
?>