Back to PhocacartRenderAdminjs class

Method __clone

public
__clone
()

Method __clone - Source code

// ========
// ROWS
// ========
/*public static function renderJsManageRowImage($i, $newRow) {

		// We have only two modal box - 1. for image, 2. for additinal images (all)
		// So we need to get info, which additional images we have clicked
		// For example, if there are 3 additional images and we click on second, in modal box, we need to get this value to set right value
		// phRowImage variable is a part of iframe url (the iframe url is build dynamically)
		// administrator\components\com_phocacart\models\fields\phocaselectfilenameimage.php
		// $link = 'index.php?option=com_phocacart&view=phocacartmanager'.$group['c'].$managerOutput.'&field='.$this->id . '\'+ (phRowImage) +\'';
		// Here
		// administrator\components\com_phocacart\views\phocacartmanager\tmpl\default_file.php
		// we get is as $this->field
		// Here
		// administrator\components\com_phocacart\libraries\phocacart\render\renderadminview.php
		// in function additionalImagesRow we call this function
		//$s[] = 'var phRowImage = 0;';
		//$s[] = 'function setPhRowImageId(rowImgId) {';
		//$s[] = '   phRowImage = rowImgId;';
		//$s[] = '}';

		$s 	= array();
		$s[] = 'var phRowCountImage = '.$i.';';
		$s[] = ' function phAddRowImage() {';
		$s[] = '   var phNewRow		= 	\'<div></div>'. $newRow .'\';';
		$s[] = '   phAddRowImageParent(phNewRow);';
		$s[] = ' }';

		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
	}*/
/*public static function renderJsManageRowAttribute($i, $newRow) {

		$url = 'index.php?option=com_phocacart&view=phocacartattributea&format=json&tmpl=component&'. Session::getFormToken().'=1';

		$s 	= array();
		$s[] = ' var phRowCountAttribute = '.$i.';';
		$s[] = ' function phAddRowAttribute() {';
		$s[] = '   var phRowOptionAttributeId = phRowCountAttribute;';// We need this Id for Options (added per $newRow)
		$s[] = '   var phNewRow = \'<div></div>'. $newRow .'\';';// (to add option in right attribute box)
		$s[] = '   phAddRowAttributeParent(phNewRow);';
		$s[] = ' }';

		$s[] = ' ';
		$s[] = ' function phRemoveRowAttribute(id) {';
		$s[] = '   if(confirm(\''.Text::_('COM_PHOCACART_WARNING_REMOVING_ATTRIBUTE_DELETES_DOWNLOAD_FOLDER_DOWNLOAD_FILE').'\')){';
		$s[] = '      phRemoveRowAttributeParent(id, \''. $url .'\');';
		$s[] = '   }';
		$s[] = ' }';

		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
	}*/
/*public static function renderJsManageRowOption($j,  $newRow, $newHeader) {

		$url = 'index.php?option=com_phocacart&view=phocacartattributea&format=json&tmpl=component&'. Session::getFormToken().'=1';

	    $s 	= array();
		$s[] = ' var phRowCountOption = '.$j.';';
		$s[] = ' function phAddRowOption(attrid) {';
		$s[] = '   var phNewRow		= 	\'<div></div>'. $newRow .'\';';
		$s[] = '   var phNewHeader	= 	\'<div></div>'. $newHeader .'\';';
		$s[] = '   phAddRowOptionParent(phNewRow, phNewHeader, attrid, \''. $url .'\');';
		$s[] = ' }';

		$s[] = ' ';
		$s[] = ' function phRemoveRowOption(id, attrid) {';
		$s[] = '   if(confirm(\''.Text::_('COM_PHOCACART_WARNING_REMOVING_ATTRIBUTE_OPTION_DELETES_DOWNLOAD_FOLDER_DOWNLOAD_FILE').'\')){';
		$s[] = '      phRemoveRowOptionParent(id, attrid, \''. $url .'\');';
		$s[] = '   }';
		$s[] = ' }';
		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
		// #phrowboxoptionjs - header created by javascript
		// #phrowboxoption - header created by php/mysql
	}*/
/*public static function renderJsManageRowSpecification($i, $newRow, $newHeader) {
		$s 	= array();
		$s[] = ' var phRowCountSpecification = '.$i.';';
		$s[] = ' function phAddRowSpecification() {';
		$s[] = '   var phNewRow		= 	\'<div></div>'. $newRow .'\';';// (to add option in right attribute box)
		$s[] = '   var phNewHeader	= 	\'<div></div>'. $newHeader .'\';';
		$s[] = '   phAddRowSpecificationParent(phNewRow, phNewHeader);';
		$s[] = '}';
		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
		// #phrowboxspecification - header created by javascript
		// #phrowboxspecificationheader - header created by php/mysql
	}*/
/*
	public static function renderJsManageRowDiscount($i, $newRow, $newHeader) {

		$compatible = PhocacartUtils::isJCompatible('3.7') ? '1' : '0';
		$s 	= array();
		$s[] = ' var phRowCountDiscount = '.$i.';';
		$s[] = ' function phAddRowDiscount() {';
		$s[] = '   var phNewRow		= 	\'<div></div>'. $newRow .'\';';// (to add option in right attribute box)
		$s[] = '   var phNewHeader	= 	\'<div></div>'. $newHeader .'\';';
		$s[] = '   phAddRowDiscountParent(phNewRow, phNewHeader, '. $compatible . ');';
		$s[] = ' }';

		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
		// #phrowboxspecification - header created by javascript
		// #phrowboxspecificationheader - header created by php/mysql
	}*/
/*public static function renderJsManageRowPriceHistory($i, $newRow) {

		$compatible = PhocacartUtils::isJCompatible('3.7') ? '1' : '0';
		$s 	= array();
		$s[] = ' var phRowCountPricehistory = '.$i.';';
		$s[] = ' function phAddRowPricehistory() {';
		$s[] = '   var phNewRow		= 	\'<div></div>'. $newRow .'\';';// (to add option in right attribute box)
		$s[] = '   phAddRowPricehistoryParent(phNewRow, '. $compatible . ');';
		$s[] = '}';
		Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
		// #phrowboxspecification - header created by javascript
		// #phrowboxspecificationheader - header created by php/mysql
	}*/
public final function __clone()
{
    throw new Exception('Function Error: Cannot clone instance of Singleton pattern', 500);
    return false;
}