diff --git a/src/7ed21e79-cbc5-48e3-9ed0-ca72b0f2f1a1/item.json b/src/7ed21e79-cbc5-48e3-9ed0-ca72b0f2f1a1/item.json new file mode 100644 index 0000000..eda724f --- /dev/null +++ b/src/7ed21e79-cbc5-48e3-9ed0-ca72b0f2f1a1/item.json @@ -0,0 +1,97 @@ +{ + "name": "DynamicCheckboxes@", + "short_description": "Super Power Repository Paths", + "description": "Dynamic Checkboxes", + "properties": { + "properties0": { + "name": "type", + "example": "change_this", + "adjustable": "1", + "mandatory": "1", + "description": "(mandatory) can be anything, just not the same as any other default Joomla field type. You can also not use the \"_\" (underscore) or \"-\" (hyphen) in the type name, and no spaces." + }, + "properties1": { + "name": "name", + "example": "dynamic_checkboxes", + "adjustable": "1", + "mandatory": "1", + "description": "(mandatory) is the unique name of the field." + }, + "properties2": { + "name": "label", + "example": "Dynamic Checkboxes", + "adjustable": "1", + "mandatory": "1", + "translatable": "1", + "description": "(mandatory) (translatable) is the descriptive title of the field." + }, + "properties3": { + "name": "description", + "example": "The checkbox linked to global subform of the same name", + "adjustable": "1", + "translatable": "1", + "description": "(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box." + }, + "properties4": { + "name": "option", + "example": "1|Default", + "adjustable": "1", + "mandatory": "1", + "description": "(mandatory) set the options of this checkboxes. Separate options with commas and use the pipe symbol to separate value from text." + }, + "properties5": { + "name": "default", + "example": "1", + "adjustable": "1", + "description": "(optional) (not translatable) is the default value." + }, + "properties6": { + "name": "required", + "example": "true", + "adjustable": "1", + "description": "(optional) The field must be filled before submitting the form." + }, + "properties7": { + "name": "showon", + "example": "", + "adjustable": "1", + "description": "(optional) show this field on the bases of the value in another field. https:\/\/joomla.stackexchange.com\/a\/17682\/2166" + }, + "properties8": { + "name": "onchange", + "example": "", + "adjustable": "1", + "description": "(optional) HTML equivalent attribute (javascript use)" + }, + "properties9": { + "name": "extends", + "example": "checkboxes", + "mandatory": "1", + "description": "Must be checkboxes" + }, + "properties10": { + "name": "type_phpHEADER_1", + "example": "\\JFormHelper::loadFieldClass('checkboxes');\r\nuse VDM\\Joomla\\Utilities\\Component\\Helper;", + "adjustable": "1", + "mandatory": "1", + "description": "The Header USE options" + }, + "properties11": { + "name": "type_php_1", + "example": "\t\/**\r\n\t * Method to get the data to be passed to the layout for rendering.\r\n\t *\r\n\t * @return array\r\n\t *\r\n\t * @since 3.5\r\n\t *\/\r\n\tprotected function getLayoutData()\r\n\t{\r\n\t\t$data = parent::getLayoutData();\r\n\r\n\t\t\/\/ True if the field has 'value' set. In other words, it has been stored, don't use the default values.\r\n\t\t$hasValue = (isset($this->value) && !empty($this->value));\r\n\r\n\t\t\/\/ If a value has been stored, use it. Otherwise, use the defaults.\r\n\t\t$checkedOptions = $hasValue ? $this->value : $this->checkedOptions;\r\n\r\n\t\t\/\/ get the form options\r\n\t\t$options = $this->getOptions();\r\n\r\n\t\t\/\/ get the component params\r\n\t\t$params = Helper::getParams();\r\n\t\t$subform = $params->get($this->fieldname);\r\n\r\n\t\t\/\/ add the paths found in global settings\r\n\t\tif (is_array($subform) && $subform !== [])\r\n\t\t{\r\n\t\t\tforeach ($subform as $value)\r\n\t\t\t{\r\n\t\t\t\tif (isset($value->path) && strlen($value->path) > 3)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tmp = new \\stdClass;\r\n\t\t\t\t\t$tmp->value = $value->set_me;\r\n\t\t\t\t\t$tmp->text = $value->set_me;\r\n\t\t\t\t\t$tmp->checked = false;\r\n\r\n\t\t\t\t\t$options[] = $tmp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$extraData = array(\r\n\t\t\t'checkedOptions' => is_array($checkedOptions) ? $checkedOptions : explode(',', (string) $checkedOptions),\r\n\t\t\t'hasValue' => $hasValue,\r\n\t\t\t'options' => $options\r\n\t\t);\r\n\r\n\t\treturn array_merge($data, $extraData);\r\n\t}", + "adjustable": "1", + "mandatory": "1", + "description": "The php for the getLayoutData method." + } + }, + "has_defaults": "0", + "datatype": "", + "datalenght": "", + "datalenght_other": "", + "datadefault": "", + "datadefault_other": "", + "indexes": "0", + "null_switch": "NOT NULL", + "store": "0", + "guid": "7ed21e79-cbc5-48e3-9ed0-ca72b0f2f1a1" +} \ No newline at end of file