Пример #1
0
 public function getUsergroupLabel($joomla_group)
 {
     $usergroups = MageBridgeFormHelper::getUsergroupOptions();
     if (!empty($usergroups)) {
         foreach ($usergroups as $usergroup) {
             if ($usergroup->value == $joomla_group) {
                 return $usergroup->text;
             }
         }
     }
 }
Пример #2
0
 /**
  * Method to get the HTML of this element
  *
  * @param null
  * @return string
  */
 protected function getInput()
 {
     $name = $this->name;
     $fieldName = $name;
     $value = $this->value;
     $usergroups = MageBridgeFormHelper::getUsergroupOptions();
     $html = null;
     $multiple = (string) $this->element['multiple'];
     if (!empty($multiple)) {
         $size = count($usergroups);
         $html = 'multiple="multiple" size="' . $size . '"';
     }
     $allownone = (bool) $this->element['allownone'];
     if ($allownone) {
         array_unshift($usergroups, array('value' => '', 'text' => ''));
     }
     return JHTML::_('select.genericlist', $usergroups, $fieldName, $html, 'value', 'text', $value);
 }
Пример #3
0
 public function getFieldUsergroup()
 {
     $usergroups = MageBridgeFormHelper::getUsergroupOptions();
     return JHTML::_('select.genericlist', $usergroups, 'usergroup', null, 'value', 'text', MagebridgeModelConfig::load('usergroup'));
 }
Пример #4
0
 public function getFieldJoomlaGroup($value = null)
 {
     $usergroups = MageBridgeFormHelper::getUsergroupOptions();
     return JHTML::_('select.genericlist', $usergroups, 'joomla_group', null, 'value', 'text', $value);
 }