Example #1
0
 /**
  * scopeControl.
  *
  * @param   string  $selectedScope            Param
  * @param   string  $created_by               Param
  * @param   string  $selectedFrontendChannel  Param
  *
  * @return  string  HTML
  */
 public static function scopeControl($selectedScope = null, $created_by = null, $selectedFrontendChannel = null)
 {
     $control = '<span class="label label-info">' . self::getScopeName($selectedScope) . '</span>';
     if ($selectedScope == 'U' && $created_by) {
         $user = JFactory::getUser($created_by);
         $control .= ' ' . $user->username;
     }
     if ($selectedScope == 'S') {
         $control .= ' ' . EHtml::label('COM_AUTOTWEET_VIEW_CHANNEL_FRONTEND_TITLE', 'COM_AUTOTWEET_VIEW_CHANNEL_FRONTEND_DESC', 'xtform[frontendchannel]') . EHtmlSelect::yesNo($selectedFrontendChannel, 'xtform[frontendchannel]');
     }
     return EHtml::genericControl('COM_AUTOTWEET_VIEW_CHANNEL_SCOPE_TITLE', 'COM_AUTOTWEET_VIEW_CHANNEL_SCOPE_DESC', null, $control, 'scope-control');
 }