PHP 클래스 ProfileController, vanilla

상속: extends BaseController
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$CanEditPhotos Can the current user edit the profile user's photo?
$CurrentTab Name of current tab.
$EditMode Is the page in "edit" mode or not.
$Form Gdn_Form
$ProfileTabs List of available tabs.
$User User data to use in building profile.
$Uses Models to automatically instantiate.

보호된 프로퍼티들

프로퍼티 타입 설명
$_TabApplication Application for current tab.
$_TabController Controller for current tab.
$_TabView View for current tab.
$_UserInfoRetrieved Whether data has been stored in $this->User yet.

공개 메소드들

메소드 설명
__construct ( ) Prep properties.
_setBreadcrumbs ( $Name = null, $Url = null )
activity ( mixed $UserReference = '', string $Username = '', integer $UserID = '', $Page = '' ) Show activity feed for this user.
addProfileTab ( mixed $TabName, string $TabUrl = '', string $CssClass = '', string $TabHtml = '' ) Adds a tab (or array of tabs) to the profile tab collection ($this->ProfileTabs).
addSideMenu ( string $CurrentUrl = '' ) Adds the option menu to the panel asset.
buildEditMenu ( SideMenuModule &$Module, string $CurrentUrl = '' )
buildProfile ( ) : boolean Build the user profile.
clear ( mixed $UserID = '' ) Clear user's current status message.
connections ( integer | string $UserReference = '', string $Username = '' ) Lists the connections to other sites.
count ( string $Column, integer $UserID = false ) Generic way to get count via UserModel->ProfileCount().
deleteInvitation ( integer $InvitationID ) Delete an invitation that has already been accepted.
disconnect ( string $UserReference = '', string $Username = '', $Provider )
edit ( mixed $UserReference = '', $Username = '', $UserID = '' ) Edit user account.
editMode ( $Switch )
get ( integer $UserID = false ) Render basic data about user.
getProfileUrl ( string | integer | null $UserReference = null, integer | null $UserID = null ) : string
getUserInfo ( $UserReference = '', string $Username = '', integer $UserID = '', boolean $CheckPermissions = false ) : boolean Retrieve the user to be manipulated. Defaults to current user.
index ( mixed $User = '', string $Username = '', integer $UserID = '', $Page = false ) Default profile page.
initialize ( ) Adds JS, CSS, & modules. Automatically run on every use.
invitations ( $UserReference = '', $Username = '', $UserID = '' ) Manage current user's invitations.
multi ( type $UserID ) Fetch multiple users
noMobile ( string $type = 'desktop' ) Set 'NoMobile' cookie for current user to prevent use of mobile theme.
notifications ( integer $Page = false ) Show notifications for current user.
notificationsPopin ( )
password ( ) Set new password for current user.
picture ( mixed $userReference = '', string $username = '', string $userID = '' ) Set user's photo (avatar).
preference ( string $Key = false ) Gets or sets a user's preference. This method is meant for ajax calls.
preferences ( mixed $UserReference = '', string $Username = '', integer $UserID = '' ) Edit user's preferences (mostly notification settings).
profileUrl ( mixed $UserReference = null, string $UserID = null ) : string Build URL to user's profile.
removePicture ( mixed $UserReference = '', string $Username = '', string $tk = '', $deliveryType = '' ) Remove the user's photo.
sendInvite ( integer $InvitationID = '' ) Let user send an invitation.
setTabView ( string $CurrentTab, string $View = '', string $Controller = 'Profile', string $Application = 'Dashboard' ) Define & select the current tab in the tab menu. Sets $this->_CurrentTab.
thumbnail ( mixed $UserReference = '', string $Username = '' ) Set user's thumbnail (crop & center photo).
uninvite ( integer $InvitationID ) Revoke an invitation.

보호된 메소드들

메소드 설명
_removeEmailFilter ( $Value )
_removeEmailPreferences ( $Data )

비공개 메소드들

메소드 설명
deleteAvatars ( string $avatar = '' ) Deletes uploaded avatars in the profile size format.
isUploadedAvatar ( string $avatar ) : boolean Test whether a path is a full url, which gives us an indication whether it's an upload or not.
saveAvatars ( string $source, array $thumbOptions, Gdn_UploadImage | null $upload = null ) : boolean Saves the avatar to /uploads in two sizes: p* : The profile-sized image, which is constrained by Garden.Profile.MaxWidth and Garden.Profile.MaxHeight.

메소드 상세

__construct() 공개 메소드

Prep properties.
부터: 2.0.0
public __construct ( )

_removeEmailFilter() 보호된 정적인 메소드

protected static _removeEmailFilter ( $Value )

_removeEmailPreferences() 보호된 정적인 메소드

protected static _removeEmailPreferences ( $Data )

_setBreadcrumbs() 공개 메소드

public _setBreadcrumbs ( $Name = null, $Url = null )

activity() 공개 메소드

Show activity feed for this user.
부터: 2.0.0
public activity ( mixed $UserReference = '', string $Username = '', integer $UserID = '', $Page = '' )
$UserReference mixed Unique identifier, possible ID or username.
$Username string Username.
$UserID integer Unique ID.

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.

addSideMenu() 공개 메소드

Adds the option menu to the panel asset.
부터: 2.0.0
public addSideMenu ( string $CurrentUrl = '' )
$CurrentUrl string Path to highlight.

buildEditMenu() 공개 메소드

public buildEditMenu ( SideMenuModule &$Module, string $CurrentUrl = '' )
$Module SideMenuModule
$CurrentUrl string

buildProfile() 공개 메소드

Set the page title, add data to page modules, add modules to assets, add tabs to tab menu. $this->User must be defined, or this method will throw an exception.
부터: 2.0.0
public buildProfile ( ) : boolean
리턴 boolean Always true.

clear() 공개 메소드

Clear user's current status message.
부터: 2.0.0
public clear ( mixed $UserID = '' )
$UserID mixed

connections() 공개 메소드

Lists the connections to other sites.
부터: 2.1
public connections ( integer | string $UserReference = '', string $Username = '' )
$UserReference integer | string
$Username string

count() 공개 메소드

Generic way to get count via UserModel->ProfileCount().
부터: 2.0.?
public count ( string $Column, integer $UserID = false )
$Column string Name of column to count for this user.
$UserID integer Defaults to current session.

deleteInvitation() 공개 메소드

Delete an invitation that has already been accepted.
public deleteInvitation ( integer $InvitationID )
$InvitationID integer

disconnect() 공개 메소드

public disconnect ( string $UserReference = '', string $Username = '', $Provider )
$UserReference string
$Username string
$Provider

edit() 공개 메소드

Edit user account.
부터: 2.0.0
public edit ( mixed $UserReference = '', $Username = '', $UserID = '' )
$UserReference mixed Username or User ID.

editMode() 공개 메소드

public editMode ( $Switch )

get() 공개 메소드

Render basic data about user.
부터: 2.0.?
public get ( integer $UserID = false )
$UserID integer Unique ID.

getProfileUrl() 공개 메소드

public getProfileUrl ( string | integer | null $UserReference = null, integer | null $UserID = null ) : string
$UserReference string | integer | null
$UserID integer | null
리턴 string

getUserInfo() 공개 메소드

Retrieve the user to be manipulated. Defaults to current user.
부터: 2.0.0
public getUserInfo ( $UserReference = '', string $Username = '', integer $UserID = '', boolean $CheckPermissions = false ) : boolean
$Username string .
$UserID integer Unique ID.
$CheckPermissions boolean Whether or not to check user permissions.
리턴 boolean Always true.

index() 공개 메소드

If current user's profile, get notifications. Otherwise show their activity (if available) or discussions.
부터: 2.0.0
public index ( mixed $User = '', string $Username = '', integer $UserID = '', $Page = false )
$User mixed Unique identifier, possible ID or username.
$Username string .
$UserID integer Unique ID.

initialize() 공개 메소드

Adds JS, CSS, & modules. Automatically run on every use.
부터: 2.0.0
public initialize ( )

invitations() 공개 메소드

Manage current user's invitations.
부터: 2.0.0
public invitations ( $UserReference = '', $Username = '', $UserID = '' )

multi() 공개 메소드

Note: API only
public multi ( type $UserID )
$UserID type

noMobile() 공개 메소드

Set 'NoMobile' cookie for current user to prevent use of mobile theme.
public noMobile ( string $type = 'desktop' )
$type string The type of mobile device. This can be one of the following: - desktop: Force the desktop theme. - mobile: Force the mobile theme. - tablet: Force the tablet theme (desktop). - app: Force the app theme (app). - 1: Unset the force cookie and use the user agent to determine the theme.

notifications() 공개 메소드

Show notifications for current user.
부터: 2.0.0
public notifications ( integer $Page = false )
$Page integer Number to skip (paging).

notificationsPopin() 공개 메소드

public notificationsPopin ( )

password() 공개 메소드

Set new password for current user.
부터: 2.0.0
public password ( )

picture() 공개 메소드

Set user's photo (avatar).
부터: 2.0.0
public picture ( mixed $userReference = '', string $username = '', string $userID = '' )
$userReference mixed Unique identifier, possible username or ID.
$username string The username.
$userID string The user's ID.

preference() 공개 메소드

Gets or sets a user's preference. This method is meant for ajax calls.
부터: 2.1
public preference ( string $Key = false )
$Key string The name of the preference.

preferences() 공개 메소드

Edit user's preferences (mostly notification settings).
부터: 2.0.0
public preferences ( mixed $UserReference = '', string $Username = '', integer $UserID = '' )
$UserReference mixed Unique identifier, possibly username or ID.
$Username string .
$UserID integer Unique identifier.

profileUrl() 공개 메소드

Build URL to user's profile.
부터: 2.0.0
public profileUrl ( mixed $UserReference = null, string $UserID = null ) : string
$UserReference mixed Unique identifier, possibly username or ID.
$UserID string Unique ID.
리턴 string Relative URL path.

removePicture() 공개 메소드

Remove the user's photo.
부터: 2.0.0
public removePicture ( mixed $UserReference = '', string $Username = '', string $tk = '', $deliveryType = '' )
$UserReference mixed Unique identifier, possibly username or ID.
$Username string .
$tk string Security token.

sendInvite() 공개 메소드

Let user send an invitation.
부터: 2.0.0
public sendInvite ( integer $InvitationID = '' )
$InvitationID integer Unique identifier.

setTabView() 공개 메소드

Define & select the current tab in the tab menu. Sets $this->_CurrentTab.
부터: 2.0.0
public setTabView ( string $CurrentTab, string $View = '', string $Controller = 'Profile', string $Application = 'Dashboard' )
$CurrentTab string Name of tab to highlight.
$View string View name. Defaults to index.
$Controller string Controller name. Defaults to Profile.
$Application string Application name. Defaults to Dashboard.

thumbnail() 공개 메소드

Set user's thumbnail (crop & center photo).
부터: 2.0.0
public thumbnail ( mixed $UserReference = '', string $Username = '' )
$UserReference mixed Unique identifier, possible username or ID.
$Username string .

uninvite() 공개 메소드

Revoke an invitation.
부터: 2.0.0
public uninvite ( integer $InvitationID )
$InvitationID integer Unique identifier.

프로퍼티 상세

$CanEditPhotos 공개적으로 프로퍼티

Can the current user edit the profile user's photo?
public $CanEditPhotos

$CurrentTab 공개적으로 프로퍼티

Name of current tab.
public $CurrentTab

$EditMode 공개적으로 프로퍼티

Is the page in "edit" mode or not.
public $EditMode

$Form 공개적으로 프로퍼티

public Gdn_Form $Form
리턴 Gdn_Form

$ProfileTabs 공개적으로 프로퍼티

List of available tabs.
public $ProfileTabs

$User 공개적으로 프로퍼티

User data to use in building profile.
public $User

$Uses 공개적으로 프로퍼티

Models to automatically instantiate.
public $Uses

$_TabApplication 보호되어 있는 프로퍼티

Application for current tab.
protected $_TabApplication

$_TabController 보호되어 있는 프로퍼티

Controller for current tab.
protected $_TabController

$_TabView 보호되어 있는 프로퍼티

View for current tab.
protected $_TabView

$_UserInfoRetrieved 보호되어 있는 프로퍼티

Whether data has been stored in $this->User yet.
protected $_UserInfoRetrieved