Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
79 | 2 | 4 | 0.994 | root |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 79 | 1 | libraries/joomla/form/fields/modulelayouts.php |
2 | 76 | 1 | libraries/joomla/html/parameter/element/modulelayouts.php |
| ||||
<?php /** * @version $Id: modulelayouts.php 12287 2009-06-22 05:04:14Z eddieajau $ * @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined( "JPATH_BASE") or exit; require_once dirname( __FILE__) . DS . 'list.php'; /** * Form Field to display a list of the layouts for a module view from the module or default template overrides. * * @package Joomla.Framework * @subpackage Form * @since 1.6 */ class JFormFieldModuleLayouts extends JFormFieldList { /** * @var string */ protected $_name= 'ModuleLayouts'; /** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ protected function _getOptions() { global $mainframe; $options= array(); $path1= NULL; $path2= NULL; // Load template entries for each menuid $db= & JFactory::getDBO(); $query= 'SELECT template' . ' FROM #__templates_menu' . ' WHERE client_id = 0 AND menuid = 0'; $db->setQuery($query); $template= $db->loadResult(); if ($module= $this->_element->attributes('module')) { $module= preg_replace('#\\W#','', $module); $path1= JPATH_SITE . DS . 'modules' . DS . $module . DS . 'tmpl'; $path2= JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . $module; $options[]= JHTML::_('select.option', '', ''); } if ($path1 && $path2) { jimport('joomla.filesystem.file'); $path1= JPath::clean($path1); $path2= JPath::clean($path2); $files= JFolder::files($path1, '^[^_]*\\.php$'); foreach ($files as $file) { $options[]= JHTML::_('select.option', JFile::stripExt($file)); } if (is_dir($path2) && $files= JFolder::files($path2, '^[^_]*\\.php$')) { $options[]= JHTML::_('select.optgroup', JText::_('JOption_From_Default')); foreach ($files as $file) { $options[]= JHTML::_('select.option', JFile::stripExt($file)); } } } // Merge any additional options in the XML definition. $options= array_merge(parent::_getOptions(), $options); return $options; } } ?> |
| ||||
<?php /** * @version $Id: assetgroups.php 12193 2009-06-20 00:43:52Z eddieajau $ * @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access defined( "JPATH_BASE") or exit; require_once dirname( __FILE__) . DS . 'list.php'; /** * Parameter to display a list of the layouts for a module from the module or default template overrides. * * @package Joomla.Framework * @subpackage Parameter */ class JElementModuleLayouts extends JElementList { /** * @var string */ protected $_name= 'ModuleLayouts'; /** * Get the options for the list. */ protected function _getOptions( &$node) { global $mainframe; $options= array(); $path1= NULL; $path2= NULL; // Load template entries for each menuid $db= & JFactory::getDBO(); $query= 'SELECT template' . ' FROM #__templates_menu' . ' WHERE client_id = 0 AND menuid = 0'; $db->setQuery($query); $template= $db->loadResult(); if ($module= $node->attributes('module')) { $module= preg_replace('#\\W#','', $module); $path1= JPATH_SITE . DS . 'modules' . DS . $module . DS . 'tmpl'; $path2= JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . $module; $options[]= JHTML::_('select.option', '', ''); } if ($path1 && $path2) { jimport('joomla.filesystem.file'); $path1= JPath::clean($path1); $path2= JPath::clean($path2); $files= JFolder::files($path1, '^[^_]*\\.php$'); foreach ($files as $file) { $options[]= JHTML::_('select.option', JFile::stripExt($file)); } if (is_dir($path2) && $files= JFolder::files($path2, '^[^_]*\\.php$')) { $options[]= JHTML::_('select.optgroup', JText::_('JOption_From_Default')); foreach ($files as $file) { $options[]= JHTML::_('select.option', JFile::stripExt($file)); } } } // Merge any additional options in the XML definition. $options= array_merge(parent::_getOptions(), $options); return $options; } } ?> |
| |||
<?php /** * @version $Id: modulelayouts.php 12287 2009-06-22 05:04:14Z eddieajau $ * @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ /** * @version $Id: assetgroups.php 12193 2009-06-20 00:43:52Z eddieajau $ * @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access defined( "JPATH_BASE") or exit; require_once dirname( __FILE__) . DS . 'list.php'; /** * Form Field to display a list of the layouts for a module view from the module or default template overrides. * * @package Joomla.Framework * @subpackage Form * @since 1.6 */ /** * Parameter to display a list of the layouts for a module from the module or default template overrides. * * @package Joomla.Framework * @subpackage Parameter */ class [[#variable512539e0]]extends [[#variable51253960]]{ /** * @var string */ protected $_name='ModuleLayouts'; /** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ /** * Get the options for the list. */ protected function _getOptions( [[#variable512538e0]]) { global $mainframe; $options=array(); $path1=NULL; $path2=NULL; // Load template entries for each menuid $db= &JFactory::getDBO(); $query='SELECT template' . ' FROM #__templates_menu' . ' WHERE client_id = 0 AND menuid = 0'; $db->setQuery($query); $template=$db->loadResult(); if ($module= [[#variable51253880]]->attributes('module')) { $module=preg_replace('#\\W#','',$module); $path1=JPATH_SITE . DS . 'modules' . DS . $module . DS . 'tmpl'; $path2=JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . $module; $options[]=JHTML::_('select.option','',''); } if ($path1 && $path2) { jimport('joomla.filesystem.file'); $path1=JPath::clean($path1); $path2=JPath::clean($path2); $files=JFolder::files($path1,'^[^_]*\\.php$'); foreach ($files as $file) { $options[]=JHTML::_('select.option',JFile::stripExt($file)); } if (is_dir($path2) && $files=JFolder::files($path2,'^[^_]*\\.php$')) { $options[]=JHTML::_('select.optgroup',JText::_('JOption_From_Default')); foreach ($files as $file) { $options[]=JHTML::_('select.option',JFile::stripExt($file)); } } } // Merge any additional options in the XML definition. $options=array_merge(parent::_getOptions(),$options); return $options; } } ?> |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#512539e0]] | JFormFieldModuleLayouts |
1 | 2 | [[#512539e0]] | JElementModuleLayouts |
2 | 1 | [[#51253960]] | JFormFieldList |
2 | 2 | [[#51253960]] | JElementList |
3 | 1 | [[#512538e0]] | |
3 | 2 | [[#512538e0]] | &$node |
4 | 1 | [[#51253880]] | $this->_element |
4 | 2 | [[#51253880]] | $node |