addProfileTab() публичный Метод

Adds a tab (or array of tabs) to the profile tab collection ($this->ProfileTabs).
С версии: 2.0.0
public addProfileTab ( mixed $TabName, string $TabUrl = '', string $CssClass = '', string $TabHtml = '' )
$TabName mixed Tab name (or array of tab names) to add to the profile tab collection.
$TabUrl string URL the tab should point to.
$CssClass string Class property to apply to tab.
$TabHtml string Overrides tab's HTML.
Пример #1
0
 /**
  * Adds 'Addons' tab to profiles and adds CSS & JS files to their head.
  *
  * @since 2.0.0
  * @package Vanilla
  *
  * @param ProfileController $Sender
  */
 public function profileController_addProfileTabs_handler($Sender)
 {
     if (is_object($Sender->User) && $Sender->User->UserID > 0) {
         $Sender->addProfileTab(t('Addons'), 'profile/addons/' . $Sender->User->UserID . '/' . urlencode($Sender->User->Name));
         // Add the discussion tab's CSS and Javascript
         $Sender->addCssFile('profile.css', 'addons');
         $Sender->addJsFile('addons.js');
     }
 }