/** * Render layout list * @param string $method * @param string $name * @param string|array $value * @param string $controlName * @param SimpleXMLElement $node * @param SimpleXMLElement $parent * @return mixed */ protected function _global($method, $name, $value, $controlName, SimpleXMLElement $node, $parent) { $this->app->document->addScript('fields:global.js'); $id = uniqid('listglobal-'); $global = $parent->getValue((string) $name) === null; $html = array(); $html[] = '<div class="global list">'; $html[] = '<input id="' . $id . '" type="checkbox"' . ($global ? ' checked="checked"' : '') . ' />'; $html[] = '<label for="' . $id . '">' . JText::_('Global') . '</label>'; $html[] = '<div class="input">'; $html[] = call_user_func_array(array($this, $method), array($name, $value, $controlName, $node, $parent)); $html[] = '</div></div>'; return implode("\n ", $html); }