vmRulesJ25(); } else { if (version_compare (JVERSION, '3.5.0', 'lt')) { return $this->vmRules(); } else { return parent::getInput(); } } } private function vmRules(){ // Initialise some field attributes. $section = $this->element['section'] ? (string)$this->element['section'] : ''; $component = $this->element['component'] ? (string)$this->element['component'] : ''; $assetField = $this->element['asset_field'] ? (string)$this->element['asset_field'] : 'asset_id'; // Get the actions for the asset. $actions = JAccess::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/' . $component . '/access.xml', "/access/section[@name='" . $section . "']/"); //$actions = JAccess::getActions($component, $section); // Iterate over the children and add to the actions. foreach ($this->element->children() as $el) { if ($el->getName() == 'action') { $actions[] = (object)array('name' => (string)$el['name'], 'title' => (string)$el['title'], 'description' => (string)$el['description']); } } // Get the explicit rules for this asset. $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('id')); $query->from($db->quoteName('#__assets')); $query->where($db->quoteName('name') . ' = ' . $db->quote($component)); $db->setQuery($query); $assetId = (int)$db->loadResult(); if ($error = $db->getErrorMsg()) { vmError($error); } // Full width format. // Get the rules for just this asset (non-recursive). $assetRules = JAccess::getAssetRules($assetId); // Get the available user groups. $groups = $this->getUserGroups(); // Build the form control. $curLevel = 0; // Prepare output $html = array(); $html[] = '
' . vmText::_('JLIB_RULES_SETTINGS_DESC') . '
'; $html[] = ' '; $html[] = '